[Codenarc-user] [ANN] Announcing CodeNarc 0.18
Brought to you by:
chrismair
From: Chris M. <chr...@ea...> - 2012-12-14 00:44:15
|
The CodeNarc Team is proud to announce the release of version 0.18. CodeNarc <http://codenarc.sourceforge.net/> is a static analysis tool for Groovy source code. Version 0.18 adds 18 new rules (bringing the total to 305 rules) and a bunch of bug fixes and enhancements. And we are now on GitHub <https://github.com/CodeNarc/CodeNarc> ! New Rules Formatting/Style · #3509530: New SpaceAfterComma rule. Checks that there is at least one space or whitespace following each comma. That includes checks for method and closure declaration parameter lists, method call parameter lists, Map literals and List literals. · #3583257: New SpaceAfterSemicolon rule. Checks that there is at least one space or whitespace following a semicolon that separates classic for loop clauses and also multiple statements per line. · #3509532: New SpaceAroundOperator rule. Check that there is at least one space (blank) or whitespace around each binary operator, including: +, -, *, /, >>, <<, &&, ||, &, |, ?:, =. · #3583262: New SpaceBeforeOpeningBrace rule. Check that there is at least one space (blank) or whitespace before each opening brace ("{"). This checks method/class/interface declarations, closure expressions and block statements. · #3583262: New SpaceAfterOpeningBrace rule. Check that there is at least one space (blank) or whitespace after each opening brace ("{"). This checks method/class/interface declarations, closure expressions and block statements. · #3583262: New SpaceAfterClosingBrace rule. Check that there is at least one space (blank) or whitespace after each closing brace ("}"). This checks method/class/interface declarations, closure expressions and block statements. · #3583262: New SpaceBeforeClosingBrace rule. Check that there is at least one space (blank) or whitespace before each closing brace ("}"). This checks method/class/interface declarations, closure expressions and block statements. · #3589701: New SpaceAfterIf rule. Check that there is exactly one space (blank) after the if keyword and before the opening parenthesis. · #3589701: New SpaceAfterWhile rule. Check that there is exactly one space (blank) after the while keyword and before the opening parenthesis. · #3589701: New SpaceAfterFor rule. Check that there is exactly one space (blank) after the for keyword and before the opening parenthesis. · #3589701: New SpaceAfterSwitch rule. Check that there is exactly one space (blank) after the switch keyword and before the opening parenthesis. · #3589701: New SpaceAfterCatch rule. Check that there is exactly one space (blank) after the catch keyword and before the opening parenthesis. JUnit · #3531554: New JUnitLostTest rule. Checks for classes that import JUnit 4 classes and contain a public, instance, void, no-arg method named test that is not annotated with @Test. · #3581377: New JUnitUnnecessaryThrowsException rule. Check for throws clauses on JUnit test methods. That is not necessary in Groovy. Grails · #3575859: New GrailsDuplicateMapping rule. Check for duplicate entry in a domain class mapping. · #3575861: New GrailsDuplicateConstraint rule. Check for duplicate constraints entry Other · #3592678: New IfStatementCouldBeTernary rule - Checks for if statements where both the if and else blocks contain only a single return statement with a value · #3581378: New ExceptionNotThrown rule - Checks for an exception constructor call without a throw as the last statement within a catch block.. Updated and Enhanced Rules · Pull request #2: Braces* rules: Adding support for catch, finally, and else brace placement validation. Thanks to Matias Bjarland. · #3521130: PrintStackTrace: Also check for StackTraceUtils.printSanitizedStackTrace(). · #3589971: Add threshold for max class metric value for CyclomaticComplexity, AbcMetric and CrapMetric. · #3574257: Rename AbcComplexity rule to AbcMetric. Deprecate old AbcComplexity rule and set enabled=false. Rename properties, e.g. maxMethodAbcScore. · Pull request #5: Enhanced UnusedVariableRule to enable ignoring some variables (ignoreVariableNames). Thanks to René Scheibe.. Bug Fixes · Fix #3555096: UnusedPrivateMethod - StringIndexOutOfBoundsException for zero-length method name. · Fix #3524882: False positive UnnecessaryPackageReference violation for Enums. · Fix #3558623: UnnecessarySemicolon - violations inside classes were ignored. Thanks to Marcin Erdmann. · Fix #3574259: CyclomaticComplexity, CrapMetric and AbcMetric (AbcComplexity): Do not check class-level metric value if maxClassAverageMethodXX value is null or 0. · Fix #3526749: The FieldName rule should ignore serialVersionUID fields by default. · Fix #3543848: Online docs; formatting on Naming rules doc. · Fix #3441842: Online docs; UnnecessarySubstring documentation is misleading. · Fix #3511004: PrivateFieldCouldBeFinal false positive (-- and ++ operators). · Fix Pull request #4: parseReport doesn't work with absolute paths on windows. Thanks to Gavin Matthews.. Framework and Infrastructure · #3546737: Migrate source code from Subversion to GitHub. Many thanks to Marcin Erdmann. · #3578372: Add notes to rule index and sample rule sets that ABC/CC rules require the GMetrics jar. · #3578909: Move helper methods from AbstractTestCase into new TestUtil class (to enable use by other test frameworks, e.g. Spock) · #3578909: Upgrade tests and test framework to JUnit 4. · #3578909: Move test framework classes into src/main/groovy, so that they are included in the CodeNarc jar: - AbstractTestCase, InMemoryAppender, TestUtil, AbstractRuleTestCase, StubRule · Switch to Sonatype OSS Maven Repository. Visit the CodeNarc Home Page <http://codenarc.sourceforge.net/> |