FYI, I have the implementation pretty much ready for allowing configuring
custom rulesets using only the rule name (rather than requiring the rule
class and/or ruleset filename).
A sample ruleset looks like this:
ruleset {
description 'A custom Groovy RuleSet (see
CodeNarcTask_CustomRuleSetTest)'
CyclomaticComplexity {
maxMethodComplexity = 1
}
ClassName
MethodName
ConfusingTernary(priority:3)
CatchThrowable {
priority = 1
enabled = false
}
// Old style - to illustrate compatibility only
rule(org.codenarc.rule.basic.ThrowExceptionFromFinallyBlockRule) {
priority = 3
}
ruleset('rulesets/dry.xml')
}
It uses a "codenarc-base-rules.properties" file to contain the rule entries,
e.g.:
AbcComplexity = org.codenarc.rule.size.AbcComplexityRule
But I wrote a script (main() method, actually) that loads all rulesets and
generates this file, so hopefully maintenance effort is minimal.
I still have to work on the documentation. My plan is to check this in
(unless I hear an objection) and document this as the preferred way to
configure a custom ruleset.
Chris
-----Original Message-----
From: Hamlet D'Arcy [mailto:ham...@gm...]
Sent: Saturday, February 26, 2011 1:30 AM
To: Cod...@li...
Subject: [Codenarc-developer] ready for release
Hi Chris,
All the defects for 0.13 are fixed. I say we start the release process by
running codenarc against the open source projects and see what happens.
Remember, we want to expand the rulesets on the sample reports. I think we
should add all rulesets in to the samples.
--
Hamlet D'Arcy
ham...@gm...
----------------------------------------------------------------------------
--
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT
data generated by your applications, servers and devices whether physical,
virtual or in the cloud. Deliver compliance at lower cost and gain new
business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Codenarc-developer mailing list
Cod...@li...
https://lists.sourceforge.net/lists/listinfo/codenarc-developer
|