The CodeNarc Team is proud to announce the release of version 0.20.
CodeNarc is a static analysis tool for Groovy source code. Version 0.20 adds 4 new rules (bringing the total to 322 rules) and a bunch of bug fixes and enhancements. Check us out on GitHub!
· #425: New LocaleSetDefault rule (design) - Checks for calls to Locale.setDefault(), which sets the Locale across the entire JVM. (Thanks to Ming Huang and Rob Patrick)
· #114: New IllegalString rule (generic) - Checks for a specified illegal string within the source code.
· #430: New SpaceAroundMapEntryColon rule (formatting) - Check for proper formatting of whitespace around ':' for literal Map entries.
· #427: New ClosureStatementOnOpeningLineOfMultipleLineClosure rule (formatting) - Checks for closure logic on first line (after ->) for a multi-line closure.
Updated and Enhanced Rules
· #426: Disable GrailsPublicControllerMethod by default.
· #424: Expand SpaceAroundOperator rule to also check for "as" operator.
· #432: Add checkLastStatementImplicitElse property on IfStatementCouldBeTernary and UnnecessaryIfStatement.
· #409: Fix bug ClassNameSameAsFilenameRule when sourceCode.name is null.
· #22: Fix DuplicateStringLiteral: Allow empty strings within ignoreStrings. (Thanks to Ei Kageyama)
· #21: Fix ClassJavadoc rule has no effect. Also ignore blank lines between javadoc and class declaration.
· #143: Fix UnsafeImplementationAsMap - duplicate violation.
· #135: Fix CoupledTestCase incorrectly thrown when referencing the current class.
· #24: Enable Groovy ruleset to find custom rules (pass the current ClassLoader to the GroovyShell). (Thanks John Engelman)
· #26: Fix MissingMethodException error on custom rule with recent Groovy. (Thanks to Joe Sondow)
· #146: Fix SpaceAroundOperator: Does not catch some violations with elvis operator (?:)
· #139: Fix JUnitPublicField to ignore interfaces.
Framework and Infrastructure
· #23: Inline violations support within rule tests. (Thanks to Artur Gajowy)
· #428: Use ClassNode if present in ImportNode to get line number and possibly source text
· #434: Remove duplicate logging of CodeNarc results.
Visit the CodeNarc Home Page