codenarc-user Mailing List for CodeNarc (Page 3)
Brought to you by:
chrismair
This list is closed, nobody may subscribe to it.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(14) |
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(11) |
Nov
(29) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(27) |
Feb
(8) |
Mar
(26) |
Apr
(9) |
May
(27) |
Jun
(8) |
Jul
(24) |
Aug
(27) |
Sep
|
Oct
(4) |
Nov
(7) |
Dec
(19) |
2012 |
Jan
|
Feb
(7) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(3) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(4) |
2013 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
|
2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(10) |
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(10) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Chris M. <chr...@ea...> - 2013-12-18 11:39:26
|
The CodeNarc Team is proud to announce the release of version 0.20. CodeNarc <http://codenarc.sourceforge.net/> 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 <https://github.com/CodeNarc/CodeNarc> ! New Rules * #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. Bug Fixes * #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 <http://codenarc.sourceforge.net/> |
From: Chris M. <chr...@ea...> - 2013-07-19 00:57:42
|
The CodeNarc Team is proud to announce the release of version 0.19. CodeNarc <http://codenarc.sourceforge.net/> is a static analysis tool for Groovy source code. Version 0.19 adds 13 new rules (bringing the total to 318 rules) and a bunch of bug fixes and enhancements. Check us out on GitHub <https://github.com/CodeNarc/CodeNarc> ! New Rules . #349: New EmptyClass rule (basic) - Reports classes without methods, fields or properties. Why would you need a class like this? . #409: New ClassNameSameAsFilename rule (naming) - Reports files containing only one top level class / enum / interface which is named differently than the file. . #214: New ThisReferenceEscapesConstructor rule (concurrency) - Reports constructors passing the 'this' reference to other methods. Thanks to Artur Gajowy. (pull request #15) . #340: New GrailsDomainReservedSqlKeywordName rule (grails) - Check for Grails domain class with class or field name which is a reserved SQL keyword. Thanks to Artur Gajowy. (pull request #13) . #339: New GrailsDomainWithServiceReference rule (grails) - Check for Grails domain class with reference to service class (field). Thanks to Artur Gajowy. (pull request #12) . #382: New JUnitPublicField rule (junit) - There is usually no reason to have a public field (even a constant) on a test class. . #407: New GStringExpressionWithinString rule (groovyism) - Check for regular (single quote) strings containing a GString-type expression (${..}). . #417: New IllegalClassMember rule (generic) - Checks for classes containing fields/properties/methods matching configured illegal member modifiers or not matching any of the configured allowed member modifiers. . #412: New EnumCustomSerializationIgnored rule (serialization) - Checks for enums that define writeObject() or writeReplace() methods, or declare serialPersistentFields or serialVersionUID fields, all of which are ignored for enums. . #421: SpaceAroundClosureArrow rule (formatting) - Checks that there is whitespace around the closure arrow (->) symbol. New "Enhanced Classpath" Ruleset: These rules require application classes on CodeNarc's classpath: . #329: New UnsafeImplementationAsMap rule - Reports incomplete interface implementations created by map-to-interface coercions. By default, this rule does not apply to test files. Thanks to Artur Gajowy. (pull request #14) . #364: New CloneWithoutCloneable rule - The method clone() should only be declared if the class implements the Cloneable interface. Thanks to Artur Gajowy. (pull request #14) . #278: New JUnitAssertEqualsConstantActualValue rule - Reports usages of org.junit.Assert.assertEquals([message,] expected, actual) where the 'actual' parameter is a constant or a literal. Most likely it was intended to be the 'expected' value.. Updated and Enhanced Rules . #371: CouldBeElvis rule. Added support for IF statements without braces. . #408: SerialVersionUID rule: Also check that serialVersionUID field is declared private. . #414: Extend UnnecessaryIfStatement rule: if (condition){ return true }; return false. . #415: Extend IfStatementCouldBeTernary rule: if (condition) { return 1 }; return 2. . #416: Enhance JUnitAssertAlwaysSucceeds and JUnitAssertAlwaysFails to catch String or number constant or List or Map literal passed in as condition parameter; and add support for checking assertNotNull().. Bug Fixes . Fix bug in UnnecessaryDefInFieldDeclarationRule making it report false positives with 'def' on right hand side of assignment . #135: CoupledTestCase incorrect violation when referencing the current class. . #19: Fix BracesForMethod rule for single-line methods. . #20: HTML Report Anchor Fix. Thanks to Jeff Beck. . #137: Mistake in ExplicitHashSetInstantiationRule violation message. . #138: SpaceAroundOperators: Add violation for isEcpr?processRecords(records[0]):''. Framework and Infrastructure . Added support for per-rule custom compilation phase, allowing for more type information in AST when required. NOTE: New rules that use a later compilation phase require that CodeNarc have the application classes being analyzed on the classpath. This adds a new int getCompilerPhase() method to Rule. Thanks to Artur Gajowy. (pull request #14) . #419: Add maxPriority property to HTML and Text ReportWriters - filter out lower priority violations. Visit the CodeNarc Home Page <http://codenarc.sourceforge.net/> |
From: Chris M. <chr...@ea...> - 2013-05-08 01:10:58
|
To CodeNarc users and developers, The next version of CodeNarc will include some new rules that require a later compiler phase for the Groovy AST compiler. Instead of the default CONVERSION phase, these rules will require the later SEMANTIC_ANALYSIS phase. The benefit is that this will allow these rules to make use of a richer and more complete Abstract Syntax Tree (AST). The downside is that the later compiler phase requires CodeNarc to have the application classes being analyzed, as well as any referenced classes, on the classpath. NOTE: If a rule requiring a later compiler phase is included in the active CodeNarc ruleset and enabled and one or more of the required classes is not on the classpath, then CodeNarc will log a Log4J WARN message for each source file that contains the missing references. This new capability was proposed and implemented by Artur Gajowy. See Pull request #14 <https://github.com/CodeNarc/CodeNarc/pull/14> for details and discussion. CodeNarc users that use the Ant Task directly will need to adjust their Ant scripts to expand the classpath, if they want to take advantage of these special new rules. I think that other tools/frameworks that use CodeNarc will not be able to use these new rules initially, because the tool classpath will not support it. The hope is that the other CodeNarc tools will eventually be enhanced to provide the expanded classpath to CodeNarc - either optionally or always - so that they can also take advantage of these new rules. We also expect to continue to introduce more of these "special" enhanced-classpath rules, since that greatly expands the capabilities for CodeNarc rules. Anyone who doesn't want to use the new rules or is unable to expand the classpath as required, can just omit these special rules from the CodeNarc ruleset or else disable the rules. Thanks. Chris |
From: Chris M. <chr...@ea...> - 2013-04-08 01:40:13
|
>> http://codenarc.sourceforge.net/StarterRuleSet-AllRulesByCategory.groovy.txt >> Is there a xml version of the above ruleset? os is there any other workaround? No, only Groovy DSL rulesets are provided; the Groovy DSL is definitely more flexible and preferred. And, as a side note, those "starter" all-rule rulesets are not really intended to be used as-is. They contain every rule, including a bunch that you may not want to enforce in your organization, as well as several (generic) rules that require custom configuration in order to do anything useful. Those rulesets are really just a starting point. But one thing you can do as a workaround is create an XML ruleset that just includes the groovy ruleset. The <ruleset-ref> element can refer to a Groovy DSL ruleset. An XML ruleset file something like this should work: <ruleset xmlns="http://codenarc.org/ruleset/1.0" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation="http://codenarc.org/ruleset/1.0 http://codenarc.org/ruleset-schema.xsd" xsi:noNamespaceSchemaLocation="http://codenarc.org/ruleset-schema.xsd"> <ruleset-ref path='http://codenarc.sourceforge.net/StarterRuleSet-AllRulesByCategory.groo vy.txt'/> </ruleset> See http://codenarc.sourceforge.net/codenarc-creating-ruleset.html for more information. Chris |
From: Evgeny G. <ev...@gm...> - 2013-04-06 10:52:02
|
Hi Paolo, You can try out my own version of the plugin: http://evgeny-goldin.com/wiki/Gradle-codenarc-plugin. It supports Groovy DSL format and grabs http://codenarc.sourceforge.net/StarterRuleSet-AllRulesByCategory.groovy.txtby default. Warm regards, Evgeny On Sat, Apr 6, 2013 at 11:18 AM, Paolo Di Tommaso <pao...@gm... > wrote: > Hi there, > > I'm trying to use the use the Gradle Codenarc plugin in my project. > > > But it is requiring a ruleset as XML file, but looking at the Codenarc > website, it seems that you are only providing the ruleset in the new groovy > based DSL format. > > > http://codenarc.sourceforge.net/StarterRuleSet-AllRulesByCategory.groovy.txt > > > Is there a xml version of the above ruleset? os is there any other > workaround? > > Cheers, > Paolo > > > ------------------------------------------------------------------------------ > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > |
From: Paolo Di T. <pao...@gm...> - 2013-04-06 09:19:47
|
Hi there, I'm trying to use the use the Gradle Codenarc plugin in my project. But it is requiring a ruleset as XML file, but looking at the Codenarc website, it seems that you are only providing the ruleset in the new groovy based DSL format. http://codenarc.sourceforge.net/StarterRuleSet-AllRulesByCategory.groovy.txt Is there a xml version of the above ruleset? os is there any other workaround? Cheers, Paolo |
From: Chris M. <chr...@ea...> - 2013-02-18 01:57:36
|
The CodeNarc Team is proud to announce the release of version 0.18.1. CodeNarc <http://codenarc.sourceforge.net/> is a static analysis tool for Groovy source code. Version 0.18.1 is a bug-fix release. Bug Fixes . Fix #3596256: SpaceAroundOperator: False positive if source line contains unicode chars. Also affects (known limitation): SpaceAfterClosingBrace, SpaceBeforeOpeningBrace, SpaceBeforeClosingBrace - Known limitation: will not catch violations on same line following unicode char literal. . Fix #3598154: SpaceAroundOperator: bad/duplicate violation for ?: after closure. Ignore standalone elvis expression statements (known limitation). . Fix #3598717: BracesForClass failing on annotation types. (Known limitation: ignore for @interface). Thanks to Marcin Gryszko. . Fix #3598732: BracesForMethod fixed for methods with closure parameters. Thanks to Marcin Gryszko. . Fix #3596323: BracesForClass ignored for enums and Groovy 1.7. Thanks to Marcin Gryszko. . Fix for CodeNarc GitHub issue #10: No such property: maxMethodComplexity for class: org.codenarc.rule.size.AbcMetricRule. . Fix #3604095: AssignCollectionSort ignore calls that pass in mutate=false; add checks for two-arg calls. . Fix #3603257: UnusedVariable reported for variable used in (more than one) for loop. Visit the CodeNarc Home Page <http://codenarc.sourceforge.net/> |
From: Chris M. <chr...@ea...> - 2013-01-22 02:39:22
|
Thanks Marcin. I’ll try to get patch releases out within the next couple weeks. From: Marcin Gryszko [mailto:ma...@gr...] Sent: Monday, January 21, 2013 3:44 PM To: cod...@li... Subject: [Codenarc-user] ETA of 0.18.1/0.19 version My colleagues and I submitted some patches to the CodeNarc codebase. Is a release planned containing those patches (including the Grails plugin)? Marcin Gryszko <http://twitter.com/mgryszko> <https://plus.google.com/112949188816397592850> <http://xing.com/profile/Marcin_Gryszko> <http://linkedin.com/in/mgryszko> <http://grysz.com> <http://slideshare.net/mgryszko> |
From: Marcin G. <ma...@gr...> - 2013-01-21 20:44:04
|
My colleagues and I submitted some patches to the CodeNarc codebase. Is a release planned containing those patches (including the Grails plugin)? Marcin Gryszko <http://twitter.com/mgryszko> <https://plus.google.com/112949188816397592850> <http://xing.com/profile/Marcin_Gryszko> <http://linkedin.com/in/mgryszko> <http://grysz.com> <http://slideshare.net/mgryszko> |
From: Garvin L. <gar...@gm...> - 2012-12-30 12:14:52
|
Hi, The Mojo team is pleased to announce the release of the CodeNarc Maven Plugin version 0.18-1. CodeNarc scans Groovy source code, looking for violations of predefined or custom rules and generates an HTML report of the results. These rules include checks for coding standards, or searching for unused code, possible bugs or bad coding practices. To get this update, simply specify the version in your project's plugin configuration: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>codenarc-maven-plugin</artifactId> <version>0.18-1</version> </plugin> Documentation for the CodeNarc Maven Plugin can be found at http://mojo.codehaus.org/codenarc-maven-plugin/index.html For more information on CodeNarc go to: http://codenarc.sourceforge.net/ Release Notes are at: http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11062&version=19018 Release Notes - Mojo - Version codenarc-maven-plugin-0.18-1 ** Bug * [MOJO-1875] - When codenarc mojo calls fail missing method exception is thrown * [MOJO-1876] - Excludes does not work * [MOJO-1894] - Update to CodeNarc 0.18 Regards, Garvin LeClaire gar...@gm... |
From: Chris M. <chr...@ea...> - 2012-12-20 11:44:46
|
The Grails CodeNarc Plugin <http://grails.org/plugin/codenarc> version 0.18 has been released, which includes support for the recent CodeNarc 0.18 release. Plugin Enhancements . Upgrade to CodeNarc 0.18. . GPCODENARC-33: Upgraded to Grails 2.2-RC: 'ReportsDslDelegate' has an incorrect modifier private. . GPCODENARC-34: grails codenarc fails in case no "target" directory exists . Migrated to new Grails Plugin Repository . Moved source to GitHub: https://github.com/chrismair/GrailsCodeNarcPlugin.git Visit the CodeNarc Home Page <http://codenarc.sourceforge.net/> Visit the Grails CodeNarc Plugin <http://grails.org/plugin/codenarc> page |
From: Marcin G. <ma...@gr...> - 2012-12-15 17:14:11
|
BracesForClassRule doesn't work well for enums. If you add a new test case to BracesForClassRuleTest: @Test void testEnum() { final SOURCE = ''' enum MyClass { } ''' rule.sameLine = false assertSingleViolation(SOURCE, 2, 'class MyClass {', 'Opening brace for the class MyClass should start on a new line') } Then the assertion message is following: java.lang.AssertionError: Wrong line number for violation: Violation[rule=BracesForClassRule[name=BracesForClass, priority=2], lineNumber=-1, sourceLine=null, message=Opening brace for the class MyClass should start on a new line] Expected: 2 Found: -1 After debugging, it seems to be a Groovy issue. AstUtil.findFirstNonAnnotationLine calls node.getLineNumber() and the ClassNode represeting an enum returns -1. Any ideas on how to fix this issue (or find a feasible workaround)? Parse the source code and find out the line number? Background: we are working on some CodeNarc issues during our open source days. Marcin Gryszko <http://twitter.com/mgryszko> <https://plus.google.com/112949188816397592850> <http://xing.com/profile/Marcin_Gryszko> <http://linkedin.com/in/mgryszko> <http://grysz.com> <http://slideshare.net/mgryszko> |
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/> |
From: Chris M. <chr...@ea...> - 2012-08-08 22:47:52
|
We have moved the CodeNarc source code over to GitHub <http://github.com/CodeNarc> . Many thanks to Marcin Erdmann for performing the migration. Note that the project web site <http://codenarc.sourceforge.net/index.html> , download files and bug/feature trackers are still hosted on Sourceforge <http://sourceforge.net/projects/codenarc/> , at least for the time being. Chris |
From: LeClaire G. <gar...@gm...> - 2012-08-03 10:27:45
|
Hi, The Mojo team is pleased to announce the release of the CodeNarc Maven Plugin version 0.17-2 . CodeNarc scans Groovy source code, looking for violations of predefined or custom rules and generates an HTML report of the results. These rules include checks for coding standards, or searching for unused code, possible bugs or bad coding practices. To get this update, simply specify the version in your project's plugin configuration: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>codenarc-maven-plugin</artifactId> <version>0.17-2</version> </plugin> Documentation for the CodeNarc Maven Plugin can be found at http://mojo.codehaus.org/codenarc-maven-plugin/index.html For more information on CodeNarc go to: http://codenarc.sourceforge.net/ Release Notes are at: https://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11062&version=18414 Release Notes - Mojo - Version codenarc-maven-plugin-0.17-2 ** Bug * [MOJO-1839] - Total bugs column is showing incorrect value ** Improvement * [MOJO-1857] - Add the ability to set maxPriority*Violations Regards, Garvin LeClaire gar...@gm... |
From: Chris M. <chr...@ea...> - 2012-07-06 22:14:47
|
We (the CodeNarc committers) use IntelliJ IDEA for development of CodeNarc, so that's why you don't see Eclipse files within the project. IntelliJ provides a free Community Edition, if you are interested: http://www.jetbrains.com/idea/ I have checked in Eclipse ".project" and ".classpath" files that enabled me to edit classes within the project and run tests. I am not committing to keeping these in sync, but we can see how things go. I used this as a guide: http://maven.apache.org/guides/mini/guide-ide-eclipse.html My steps included: mvn eclipse:eclipse Eclipse: Defined M2_REPO classpath variable Eclipse: Install Groovy Plugin: Groovy Update Site - http://dist.springsource.org/release/GRECLIPSE/e3.6/ Eclipse: Settings -> Convert to a Groovy project Good luck. Chris -----Original Message----- From: 笑非 王 [mailto:wan...@ya...] Sent: Friday, July 06, 2012 4:56 AM To: cod...@li... Subject: [Codenarc-user] HELP!!!how to use eclipse to develop codenarc? Hi,all I have downloaded the codenarc, and want to develop it in eclipse. But I found that the eclipse can't find projects in the file of codenarc, so I want to ask that does it possible to develop the codenarc with eclipse?If so ,how to set eclipse and my computer? Eclipse version: 3.7.2 System:Windows 7 thanks a lot |
From: 笑非 王 <wan...@ya...> - 2012-07-06 08:56:54
|
Hi,all I have downloaded the codenarc, and want to develop it in eclipse. But I found that the eclipse can't find projects in the file of codenarc, so I want to ask that does it possible to develop the codenarc with eclipse?If so ,how to set eclipse and my computer? Eclipse version: 3.7.2 System:Windows 7 thanks a lot |
From: 王笑非 <wan...@gm...> - 2012-07-06 08:26:54
|
Hi,all I have downloaded the codenarc, and want to develop it in eclipse. But I found that the eclipse can't find projects in the file of codenarc, so I want to ask that does it possible to develop the codenarc with eclipse?If so ,how to set eclipse and my computer? Eclipse version: 3.7.2 System:Windows 7 thanks a lot |
From: LeClaire G. <gar...@gm...> - 2012-04-09 01:02:38
|
HI, The Mojo team is pleased to announce the release of the CodeNarc Maven Plugin version 0.17-1 . CodeNarc scans Groovy source code, looking for violations of predefined or custom rules and generates an HTML report of the results. These rules include checks for coding standards, or searching for unused code, possible bugs or bad coding practices. To get this update, simply specify the version in your project's plugin configuration: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>codenarc-maven-plugin</artifactId> <version>0.17-1</version> </plugin> Documentation for the CodeNarc Maven Plugin can be found at http://mojo.codehaus.org/codenarc-maven-plugin/index.html For more information on CodeNarc go to: http://codenarc.sourceforge.net/ Release Notes are at: https://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11062&version=18347 Release Notes - Mojo - Version codenarc-maven-plugin-0.17-1 ** Bug * [MOJO-1814] - Fix relative link to 'sample report' on main page * [MOJO-1815] - codenarc-maven-plugin xml file (CodeNarc.xml) contains a package element with path attribute with no value. ** Improvement * [MOJO-1822] - Update to CodeNarc 0.17 * [MOJO-1823] - Update version to a format following CodeNarc versions * [MOJO-1824] - Add CodeNarc version info to Site Introduction page Regards, Garvin LeClaire gar...@gm... |
From: LeClaire G. <gar...@gm...> - 2012-03-29 01:52:45
|
I am preparing for a release of version 0.17-1.0.0 of the CodeNarc Maven Plugin. Documentation for the CodeNarc Maven Plugin can be found at http://mojo.codehaus.org/codenarc-maven-plugin/index.html Please give the SNAPSHOT a test and report any issues. To get this update, simply specify the version in your project's plugin configuration: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>codenarc-maven-plugin</artifactId> <version>0.17-1.0.0-SNAPSHOT</version> </plugin> Release Notes - Mojo - Version codenarc-maven-plugin-0.17-1.0.0 ** Bug * [MOJO-1814] - Fix relative link to 'sample report' on main page * [MOJO-1815] - codenarc-maven-plugin xml file (CodeNarc.xml) contains a package element with path attribute with no value. ** Improvement * [MOJO-1822] - Update to CodeNarc 0.17 * [MOJO-1823] - Update version to a format following CodeNarc versions * [MOJO-1824] - Add CodeNarc version info to Site Introduction page Regards, Garvin LeClaire gar...@gm... |
From: Chris M. <chr...@ea...> - 2012-03-25 12:04:25
|
The CodeNarc Team is proud to announce the release of version 0.17. CodeNarc <http://codenarc.sourceforge.net/> is a static analysis tool for Groovy source code. Version 0.17 adds 9 new rules (bringing the total to 286 rules) and a bunch of bug fixes and enhancements. You can soon try it out on the CodeNarc web console <http://meetcodenarc.appspot.com/edit/14001> , running on Google App Engine. New Rules . New PrivateFieldCouldBeFinal rule (#3433042): Checks for private fields that are only set within a constructor or field initializer. Such fields can safely be made final. . New ParameterReassignment rule (#3432991): Checks for a method or closure parameter being reassigned to a new value within the body of the method/closure, which is a confusing, bad practice. Use a temporary variable instead. . New TernaryCouldBeElvis rule (#3108331): Checks for a ternary expression with boolean and true expressions that are the same; this can be simplified to an Elvis expression. . New AssertWithinFinallyBlock rule (#3489801): Checks for assert statements within a finally block. An assert can throw an exception, hiding the original exception, if there is one. . New ConstantAssertExpression rule (#3489800): Checks for assert statements where the assert condition expressions is a constant value or literal value. . New BrokenNullCheck rule (#3161693): Looks for faulty checks for null that can cause a NullPointerException. . New VectorIsObsolete rule (#3495466): Checks for references to the (effectively) obsolete java.util.Vector class. Use the Java Collections Framework classes instead, including ArrayList or Collections.synchronizedList(). . New HashtableIsObsolete rule (#3495466): Checks for references to the (effectively) obsolete java.util.Hashtable class. Use the Java Collections Framework classes instead, including HashMap or ConcurrentHashMap. . New CrapMetric rule (#3485545): Checks the CRAP metric score for methods. This metric is based on the cyclomatic complexity and test coverage for individual methods. Requires a Cobertura XML coverage file and GMetrics 0.5. Updated and Enhanced Rules . #3476844: Extend GetterMethodCouldBeProperty to also check static getter methods. . #3477351: UnnecessaryConstructor: Also catch constructor containing only call to super(). . #3460463: StatelessClassRule and GrailsStatelessServiceRule: Ignore fields annotated with @Inject. . #3460463: GrailsStatelessServiceRule: Ignore non-static properties (i.e., no visibility modifier specified) declared with "def". . #3485544: AssignmentInConditional: Also catch nested binary expressions, e.g. if (x==1 || x=3) . #3488705: GrailsDomainHasToString: Ignore classes annotated with @ToString or @Canonical. . #3488704: GrailsDomainHasEquals: Ignore classes annotated with @EqualsAndHashCode or @Canonical. . #3501349: UnnecessaryPackageReference: Also check for explicitly-imported classes. . #3509542: UnnecessaryPackageReference: Also check for package references in "as <Class>". Bug Fixes . #3463408: Remove unintended dependency on Java 1.6 (String.isEmpty()). . #3475170: Fix duplicate violations for SimpleDateFormatMissingLocale. . #3477085. Fix UnusedImport violations missing line numbers for imports with semicolons. . #3477162: Fix duplicate violations for UnnecessaryDotClass. . #3487448: Fix UnnecessaryNullCheckBeforeInstanceOf should also check standalone binary (boolean) expressions, e.g. boolean ready = x != null && x instanceof Integer . #3496557: Fix UseCollectNestedRule: GroovyCastException: Cannot cast object VariableExpression to class ClosureExpression . #3496696: Fix UnusedPrivateFieldRule: GroovyCastException: Cannot cast object with class 'org.codehaus.groovy.ast.FieldNode' to class 'groovy.lang.MetaClass'. Framework and Infrastructure . #3495841: Support Groovy 2.x. . #3496463: Support GMetrics 0.5. Visit the CodeNarc Home Page <http://codenarc.sourceforge.net/> |
From: LeClaire G. <gar...@gm...> - 2012-02-27 11:49:56
|
Hi, The Mojo team is pleased to announce the release of version 0.16.1-beta-1 of the CodeNarc Maven Plugin. CodeNarc scans Groovy source code, looking for violations of predefined or custom rules and generates an HTML report of the results. These rules include checks for coding standards, or searching for unused code, possible bugs or bad coding practices. For more information on CodeNarc go to: http://codenarc.sourceforge.net/ This is an initial release for the general community. Documentation for the CodeNarc Maven Plugin can be found at http://mojo.codehaus.org/codenarc-maven-plugin/index.html Enjoy, The Mojo team. |
From: Hamlet D. <ham...@ca...> - 2012-02-21 08:21:15
|
Can the user override the version of CodeNarc? ----- Original Message ----- > Darcy, > > I do have the ability to override the version for Codenarc, log4j and > Groovy. I just have to update the documentation to reflect the > changes. > > > Regards, > > Garvin LeClaire > gar...@gm... > > > > On Feb 17, 2012, at 1:32 AM, Hamlet DArcy wrote: > > > What did you update? > > > > Is there documentation on your new features anywhere? > > > > -- > > Hamlet > > > > ----- Original Message ----- > >> I have updated the Maven plugin at > >> http://mojo.codehaus.org/codenarc-maven-plugin/ > >> Try it and give any feedback. It is still a SNAPSHOT. See > >> http://mojo.codehaus.org/using-sandbox-plugins.html for > >> information > >> on using SNAPSHOT plugins. > >> > >> > >> Regards, > >> > >> Garvin LeClaire > >> > >> Sent from my iPad > >> > >> ------------------------------------------------------------------------------ > >> Virtualization & Cloud Management Using Capacity Planning > >> Cloud computing makes use of virtualization - but cloud computing > >> also focuses on allowing computing to be delivered as a service. > >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ > >> _______________________________________________ > >> Codenarc-user mailing list > >> Cod...@li... > >> https://lists.sourceforge.net/lists/listinfo/codenarc-user > >> > > |
From: LeClaire G. <gar...@gm...> - 2012-02-20 15:01:01
|
Darcy, I do have the ability to override the version for Codenarc, log4j and Groovy. I just have to update the documentation to reflect the changes. Regards, Garvin LeClaire gar...@gm... On Feb 17, 2012, at 1:32 AM, Hamlet DArcy wrote: > What did you update? > > Is there documentation on your new features anywhere? > > -- > Hamlet > > ----- Original Message ----- >> I have updated the Maven plugin at >> http://mojo.codehaus.org/codenarc-maven-plugin/ >> Try it and give any feedback. It is still a SNAPSHOT. See >> http://mojo.codehaus.org/using-sandbox-plugins.html for information >> on using SNAPSHOT plugins. >> >> >> Regards, >> >> Garvin LeClaire >> >> Sent from my iPad >> >> ------------------------------------------------------------------------------ >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> _______________________________________________ >> Codenarc-user mailing list >> Cod...@li... >> https://lists.sourceforge.net/lists/listinfo/codenarc-user >> |
From: Hamlet D. <ham...@ca...> - 2012-02-20 08:38:02
|
Is there any way to make the CodeNarc version a property on the Maven plugin? Gradle had (has?) the same problem of a hard-coded version, and it forces the plugin to be updated and released everytime a CodeNarc binary is released. ----- Original Message ----- > The biggest update is that it uses the latest version of CodeNarc > (0.16.1). > > I added the ability to control the maxheap size use by the plugin. > > Check the documentation over for any short comings. > > Give it try and send back any feedback. If it all goes well I can > release it. > > > Regards, > > Garvin LeClaire > gar...@gm... > > > > On Feb 17, 2012, at 1:32 AM, Hamlet DArcy wrote: > > > What did you update? > > > > Is there documentation on your new features anywhere? > > > > -- > > Hamlet > > > > ----- Original Message ----- > >> I have updated the Maven plugin at > >> http://mojo.codehaus.org/codenarc-maven-plugin/ > >> Try it and give any feedback. It is still a SNAPSHOT. See > >> http://mojo.codehaus.org/using-sandbox-plugins.html for > >> information > >> on using SNAPSHOT plugins. > >> > >> > >> Regards, > >> > >> Garvin LeClaire > >> > >> Sent from my iPad > >> > >> ------------------------------------------------------------------------------ > >> Virtualization & Cloud Management Using Capacity Planning > >> Cloud computing makes use of virtualization - but cloud computing > >> also focuses on allowing computing to be delivered as a service. > >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ > >> _______________________________________________ > >> Codenarc-user mailing list > >> Cod...@li... > >> https://lists.sourceforge.net/lists/listinfo/codenarc-user > >> > > |