0

For classes ending with "**Setup", the default format rule of ClassName should be replaced with a rule allowing inner class names to start with a lowercase letter - if it extends another class. How can I do this?

A concrete example:

class MyExampleSetup {

  // valid, turn off ClassName check
  static class myInnerClass extends MyInnerClass() {....}
  // valid, normal class name Check
  static class MyOtherInnerClass () {....}
}
user3001
  • 3,437
  • 5
  • 28
  • 54
  • 2
    Why oh why would you want to do that? It's a universally accepted convention to make class names start with an uppercase letter. Just respect the convention. – JB Nizet May 22 '12 at 17:15
  • Its being used for configuration of the extended class. In the inner classes, some properties are overridden and configuration-dependent wireing ist done. There's some "magic" in the background ;) But its not the point of the question, be assured I know what I'm doing :) – user3001 May 22 '12 at 17:44

1 Answers1

1

Unfortunately, that is impossible out of the box. What you are really asking for is a modification of behavior for one check (TypeName). The only way of implementing such a thing is by implementing your own custom check.

(Like the previous posters, I must urge you to consider using annotations for the background magic instead of relying on the naming convention. But that wasn't your question of course.)

barfuin
  • 16,865
  • 10
  • 85
  • 132