[Codenarc-developer] DuplicateLiteralRule
Brought to you by:
chrismair
From: Chris M. <chr...@ea...> - 2010-11-05 02:16:46
|
Hamlet, I like the new DuplicateLiteralRule. I am considering moving that to a different (maybe new) ruleset. That rule may not be as "universal" as I'd like for the basic ruleset. Plus, I know that once I release that, I'll have to turn it off immediately where I work or else face a deluge of violations in our tens of thousands of lines of existing Groovy code. And I assume the same when I generate my sample reports against Grails/Griffon. I am wondering whether there might be the opportunity for other similar rules, such as duplicate number literals? I notice you named the rule "duplicate literal", so you could cover that within the same rule. Or else perhaps have DuplicateStringLiteral and DuplicateNumberLiteral. (That might also depend on whether anyone would ever want to control or configure those separately) I might consider creating a "Duplication" or "Dry" ruleset, especially if there was the possibility of other similar rules. But perhaps even if not. I appreciate having someone else to bounce this off, so if you have a strong opinion, let me know. Chris |