[Codenarc-developer] Considering Reorganizing the "Basic" RuleSet --> GroovyIdioms
Brought to you by:
chrismair
From: Chris M. <chr...@ea...> - 2011-10-13 23:57:04
|
To CodeNarc Users, I am considering moving a subset of the rules currently in the CodeNarc Basic ruleset into one or more other new rulesets, probably including at least a ruleset encoding Groovy-specific idioms or best practices. I do not make this decision lightly. I know this will impact current users (including me), requiring adjustment of custom CodeNarc rulesets, if they: · Include the Basic ruleset and then configured any of the affected rules within that ruleset closure. · Include rules explicitly by class name My motivations include: Ø The Basic ruleset has strayed from my original intent of being a core set of serious and uncontroversial rules. All violations of these should be fixed. As it is now, that ruleset includes a bunch of rules that are less-important or are not universal practices. Ø The Basic ruleset has become large and unwieldy. Ø There may be value in having a separate ruleset encoding Groovy-specific idioms. That all being said, Id like to (continue to) reduce the emphasis on the organization and categorization of the predefined ruleset anyway. Id like users to be able to focus more on the rules, not really caring which rulesets contain them. Some Basic Rules That Could Be Groovy-Specific (GroovyIdiom or Groovyism?) * AssignCollectionSort * AssignCollectionUnique * ClosureAsLastMethodParameter * ExplicitArrayListInstantiation * ExplicitCallToAndMethod * ExplicitCallToCompareToMethod * ExplicitCallToDivMethod * ExplicitCallToEqualsMethod * ExplicitCallToGetAtMethod * ExplicitCallToLeftShiftMethod * ExplicitCallToMinusMethod * ExplicitCallToModMethod * ExplicitCallToMultiplyMethod * ExplicitCallToOrMethod * ExplicitCallToPlusMethod * ExplicitCallToPowerMethod * ExplicitCallToRightShiftMethod * ExplicitCallToXorMethod * ExplicitGarbageCollection * ExplicitHashMapInstantiation * ExplicitHashSetInstantiation * ExplicitLinkedHashMapInstantiation * ExplicitLinkedListInstantiation * ExplicitStackInstantiation * ExplicitTreeSetInstantiation * GStringAsMapKey * GroovyLangImmutable Please let me know if you have any opinions one way or another. Thanks. Chris |