codenarc-user Mailing List for CodeNarc (Page 6)
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: Olivier G. <ogo...@sm...> - 2011-08-06 03:07:48
|
k. Will try that as soon as I understand why my Spock tests suddenly stopped executing...! On Fri, Aug 5, 2011 at 9:45 AM, Hamlet DArcy <ham...@ca...> wrote: > In the meantime you can always run CodeNarc as part of your UnitTests: > > http://codenarc.sourceforge.net/codenarc-run-as-a-test.html > > I actually find this way of running it nicer :) > > > > ----- Original Message ----- > > > > Thank you very much for the answer. I tried various repositories and > > dependencies, following your lead, to no avail. > > > > I can't subscribe (or post) to the mojo user mailing list. I sent an > > email to use...@mo... but did not get an > > answer....... > > > > Thanks, > > > > Olivier > > > > > > > > > > On Fri, Aug 5, 2011 at 2:17 AM, Hamlet DArcy < ham...@ca... > > > wrote: > > > > > > Hi, > > > > I'm sorry to hear you had problems running the Maven plugin. > > > > While we're waiting for someone else to provide a good answer to the > > question, you might try asking the same question on the > > mojo.codehaus.org mailing list: > > > > http://mojo.codehaus.org/codenarc-maven-plugin/mail-lists.html > > > > We don't actually maintain the Maven plugin ourselves, so you might > > find that list is more knowledgeable about it. > > > > Now, I will try to answer the question. > > > > I tried to look at Maven Central and the CodeHaus Maven repository > > and didn't see the org.codehaus.mojo:codenarc-maven-plugin > > dependency. I believe this dependency should sit in Maven just like > > any other dependency. I want to check this because perhaps the > > version number is wrong. > > > > I did find the dependency in the Mojo Repo though: > > > https://nexus.codehaus.org/content/groups/snapshots-group/org/codehaus/mojo/codenarc-maven-plugin/ > > > > > > Did you add this repository to your pom.xml, or are you using just > > Maven Central to resolve dependencies? I think you might need to add > > the https://nexus.codehaus.org repository. I don't know the exact > > XML to do this though. > > > > Thanks, > > Hamlet > > > > > > > > > > ----- Original Message ----- > > > > > > Hi there, > > > > > > I've tried to include codenarc reports in my maven project, without > > > luck. The documentation at > > > http://mojo.codehaus.org/codenarc-maven-plugin/index.html does not > > > seem to help. > > > I get: > > > > > > Reason: POM 'org.codehaus.mojo:codenarc-maven-plugin' not found in > > > repository: Unable to download the artifact from any repository > > > > > > org.codehaus.mojo:codenarc-maven-plugin:pom:0.8-alpha-1-SNAPSHOT > > > > > > Help? > > > > > > Thanks, > > > > > > Olivier > > > > > > > ------------------------------------------------------------------------------ > > > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > > > The must-attend event for mobile developers. Connect with experts. > > > Get tools for creating Super Apps. See the latest technologies. > > > Sessions, hands-on labs, demos & much more. Register early & save! > > > http://p.sf.net/sfu/rim-blackberry-1 > > > _______________________________________________ > > > Codenarc-user mailing list > > > Cod...@li... > > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > > > > > > > ------------------------------------------------------------------------------ > > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > > The must-attend event for mobile developers. Connect with experts. > > Get tools for creating Super Apps. See the latest technologies. > > Sessions, hands-on labs, demos & much more. Register early & save! > > http://p.sf.net/sfu/rim-blackberry-1 > > _______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > |
From: Hamlet D. <ham...@ca...> - 2011-08-05 13:45:09
|
In the meantime you can always run CodeNarc as part of your UnitTests: http://codenarc.sourceforge.net/codenarc-run-as-a-test.html I actually find this way of running it nicer :) ----- Original Message ----- > > Thank you very much for the answer. I tried various repositories and > dependencies, following your lead, to no avail. > > I can't subscribe (or post) to the mojo user mailing list. I sent an > email to use...@mo... but did not get an > answer....... > > Thanks, > > Olivier > > > > > On Fri, Aug 5, 2011 at 2:17 AM, Hamlet DArcy < ham...@ca... > > wrote: > > > Hi, > > I'm sorry to hear you had problems running the Maven plugin. > > While we're waiting for someone else to provide a good answer to the > question, you might try asking the same question on the > mojo.codehaus.org mailing list: > > http://mojo.codehaus.org/codenarc-maven-plugin/mail-lists.html > > We don't actually maintain the Maven plugin ourselves, so you might > find that list is more knowledgeable about it. > > Now, I will try to answer the question. > > I tried to look at Maven Central and the CodeHaus Maven repository > and didn't see the org.codehaus.mojo:codenarc-maven-plugin > dependency. I believe this dependency should sit in Maven just like > any other dependency. I want to check this because perhaps the > version number is wrong. > > I did find the dependency in the Mojo Repo though: > https://nexus.codehaus.org/content/groups/snapshots-group/org/codehaus/mojo/codenarc-maven-plugin/ > > > Did you add this repository to your pom.xml, or are you using just > Maven Central to resolve dependencies? I think you might need to add > the https://nexus.codehaus.org repository. I don't know the exact > XML to do this though. > > Thanks, > Hamlet > > > > > ----- Original Message ----- > > > > Hi there, > > > > I've tried to include codenarc reports in my maven project, without > > luck. The documentation at > > http://mojo.codehaus.org/codenarc-maven-plugin/index.html does not > > seem to help. > > I get: > > > > Reason: POM 'org.codehaus.mojo:codenarc-maven-plugin' not found in > > repository: Unable to download the artifact from any repository > > > > org.codehaus.mojo:codenarc-maven-plugin:pom:0.8-alpha-1-SNAPSHOT > > > > Help? > > > > Thanks, > > > > Olivier > > > > ------------------------------------------------------------------------------ > > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > > The must-attend event for mobile developers. Connect with experts. > > Get tools for creating Super Apps. See the latest technologies. > > Sessions, hands-on labs, demos & much more. Register early & save! > > http://p.sf.net/sfu/rim-blackberry-1 > > _______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > The must-attend event for mobile developers. Connect with experts. > Get tools for creating Super Apps. See the latest technologies. > Sessions, hands-on labs, demos & much more. Register early & save! > http://p.sf.net/sfu/rim-blackberry-1 > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > |
From: Olivier G. <ogo...@sm...> - 2011-08-05 13:38:55
|
Thank you very much for the answer. I tried various repositories and dependencies, following your lead, to no avail. I can't subscribe (or post) to the mojo user mailing list. I sent an email to use...@mo... but did not get an answer....... Thanks, Olivier On Fri, Aug 5, 2011 at 2:17 AM, Hamlet DArcy <ham...@ca...> wrote: > Hi, > > I'm sorry to hear you had problems running the Maven plugin. > > While we're waiting for someone else to provide a good answer to the > question, you might try asking the same question on the mojo.codehaus.orgmailing list: > > http://mojo.codehaus.org/codenarc-maven-plugin/mail-lists.html > > We don't actually maintain the Maven plugin ourselves, so you might find > that list is more knowledgeable about it. > > Now, I will try to answer the question. > > I tried to look at Maven Central and the CodeHaus Maven repository and > didn't see the org.codehaus.mojo:codenarc-maven-plugin dependency. I believe > this dependency should sit in Maven just like any other dependency. I want > to check this because perhaps the version number is wrong. > > I did find the dependency in the Mojo Repo though: > > https://nexus.codehaus.org/content/groups/snapshots-group/org/codehaus/mojo/codenarc-maven-plugin/ > > > Did you add this repository to your pom.xml, or are you using just Maven > Central to resolve dependencies? I think you might need to add the > https://nexus.codehaus.org repository. I don't know the exact XML to do > this though. > > Thanks, > Hamlet > > ----- Original Message ----- > > > > Hi there, > > > > I've tried to include codenarc reports in my maven project, without > > luck. The documentation at > > http://mojo.codehaus.org/codenarc-maven-plugin/index.html does not > > seem to help. > > I get: > > > > Reason: POM 'org.codehaus.mojo:codenarc-maven-plugin' not found in > > repository: Unable to download the artifact from any repository > > > > org.codehaus.mojo:codenarc-maven-plugin:pom:0.8-alpha-1-SNAPSHOT > > > > Help? > > > > Thanks, > > > > Olivier > > > > > ------------------------------------------------------------------------------ > > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > > The must-attend event for mobile developers. Connect with experts. > > Get tools for creating Super Apps. See the latest technologies. > > Sessions, hands-on labs, demos & much more. Register early & save! > > http://p.sf.net/sfu/rim-blackberry-1 > > _______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > |
From: Hamlet D. <ham...@ca...> - 2011-08-05 06:18:15
|
Hi, I'm sorry to hear you had problems running the Maven plugin. While we're waiting for someone else to provide a good answer to the question, you might try asking the same question on the mojo.codehaus.org mailing list: http://mojo.codehaus.org/codenarc-maven-plugin/mail-lists.html We don't actually maintain the Maven plugin ourselves, so you might find that list is more knowledgeable about it. Now, I will try to answer the question. I tried to look at Maven Central and the CodeHaus Maven repository and didn't see the org.codehaus.mojo:codenarc-maven-plugin dependency. I believe this dependency should sit in Maven just like any other dependency. I want to check this because perhaps the version number is wrong. I did find the dependency in the Mojo Repo though: https://nexus.codehaus.org/content/groups/snapshots-group/org/codehaus/mojo/codenarc-maven-plugin/ Did you add this repository to your pom.xml, or are you using just Maven Central to resolve dependencies? I think you might need to add the https://nexus.codehaus.org repository. I don't know the exact XML to do this though. Thanks, Hamlet ----- Original Message ----- > > Hi there, > > I've tried to include codenarc reports in my maven project, without > luck. The documentation at > http://mojo.codehaus.org/codenarc-maven-plugin/index.html does not > seem to help. > I get: > > Reason: POM 'org.codehaus.mojo:codenarc-maven-plugin' not found in > repository: Unable to download the artifact from any repository > > org.codehaus.mojo:codenarc-maven-plugin:pom:0.8-alpha-1-SNAPSHOT > > Help? > > Thanks, > > Olivier > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > The must-attend event for mobile developers. Connect with experts. > Get tools for creating Super Apps. See the latest technologies. > Sessions, hands-on labs, demos & much more. Register early & save! > http://p.sf.net/sfu/rim-blackberry-1 > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > |
From: Olivier G. <ogo...@sm...> - 2011-08-05 02:46:32
|
Hi there, I've tried to include codenarc reports in my maven project, without luck. The documentation at http://mojo.codehaus.org/codenarc-maven-plugin/index.html does not seem to help. I get: Reason: POM 'org.codehaus.mojo:codenarc-maven-plugin' not found in repository: Unable to download the artifact from any repository org.codehaus.mojo:codenarc-maven-plugin:pom:0.8-alpha-1-SNAPSHOT Help? Thanks, Olivier |
From: Chris M. <chr...@ea...> - 2011-08-04 01:22:10
|
The CodeNarc Team is proud to announce the release of version 0.15. CodeNarc <http://codenarc.sourceforge.net/> is a static analysis tool for Groovy source code. Version 0.15 adds 23 new rules (bringing the total to 264 rules) and a bunch of bug fixes and enhancements. Try it out on the CodeNarc web console <http://meetcodenarc.appspot.com/edit/14001> , running on Google App Engine. New and Updated Rules · AssignCollectionUnique rule (basic) - The Collections.unique() method mutates the list and returns the list as a value. If you are assigning the result of unique() to a variable, then you probably don't realize that you're also modifying the original list as well. This is frequently the cause of subtle bugs. · AssignCollectionSort rule (basic) - The Collections.sort() method mutates the list and returns the list as a value. If you are assigning the result of sort() to a variable, then you probably don't realize that you're also modifying the original list as well. This is frequently the cause of subtle bugs. · BitwiseOperatorInConditional rule (basic) - Checks for bitwise operations in conditionals, if you need to do a bitwise operation then it is best practive to extract a temp variable. · HardcodedWindowsRootDirectory rule (basic) - This rule find cases where a File object is constructed with a windows-based path. This is not portable, and using the File.listRoots() method is a better alternative. · HardCodedWindowsFileSeparator rule (basic) - This rule finds usages of a Windows file separator within the constructor call of a File object. It is better to use the Unix file separator or use the File.separator constant. · RandomDoubleCoercedToZero rule (basic) - The Math.random() method returns a double result greater than or equal to 0.0 and less than 1.0. If you coerce this result into an Integer or int, then it is coerced to zero. Casting the result to int, or assigning it to an int field is probably a bug. · UnnecessaryDefInVariableDeclaration rule (unnecessary) - If a variable has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance 'def private n = 2' is redundant and can be simplified to 'private n = 2'. · UnnecessaryDefInMethodDeclaration rule (unnecessary) - Added more checked modifiers: final, synchronized, abstract, strictfp. Multiple method declarations in a single line are handled correctly. · UnnecessaryDotClass rule (unnecessary) - To make a reference to a class, it is unnecessary to specify the '.class' identifier. For instance String.class can be shortened to String. · UnnecessaryInstanceOfCheck rule (unnecessary) - This rule finds instanceof checks that cannot possibly evaluate to true. For instance, checking that (!variable instanceof String) will never be true because the result of a not expression is always a boolean. · UnnecessarySubstring rule (unnecessary) - This rule finds usages of String.substring(int) and String.substring(int, int) that can be replaced by use of the subscript operator. For instance, var.substring(5) can be replaced with var[5..-1]. · BracesForClass rule (formatting) - Checks the location of the opening brace ({) for classes. By default, requires them on the same line, but the sameLine property can be set to false to override this. · LineLength rule (formatting) - Checks the maximum length for each line of source code. It checks for number of characters, so lines that include tabs may appear longer than the allowed number when viewing the file. The maximum line length can be configured by setting the length property, which defaults to 120. · BracesForForLoop rule (formatting) - Checks the location of the opening brace ({) for for loops. By default, requires them on the same line, but the sameLine property can be set to false to override this. · BracesForIfElse rule (formatting) - Checks the location of the opening brace ({) for if statements. By default, requires them on the same line, but the sameLine property can be set to false to override this. · BracesForMethod rule (formatting) - Checks the location of the opening brace ({) for constructors and methods. By default, requires them on the same line, but the sameLine property can be set to false to override this. · BracesForTryCatchFinally rule (formatting) - Checks the location of the opening brace ({) for try statements. By default, requires them on the line, but the sameLine property can be set to false to override this. · ClassJavadoc rule (formatting) - Makes sure each class and interface definition is preceded by javadoc. Enum definitions are not checked, due to strange behavior in the Groovy AST. · GrailsDomainHasToString rule (grails) - Checks that Grails domain classes redefine toString() · GrailsDomainHasEquals rule (grails) - Checks that Grails domain classes redefine equals(). · JdbcConnectionReference rule (jdbc) - Check for direct use of java.sql.Connection, which is discouraged and almost never necessary in application code. · JdbcResultSetReference rule (jdbc) - Check for direct use of java.sql.ResultSet, which is not necessary if using the Groovy Sql facility or an ORM framework such as Hibernate. · JdbcStatementReference rule (jdbc) - Check for direct use of java.sql.Statement, java.sql.PreparedStatement, or java.sql.CallableStatement, which is not necessary if using the Groovy Sql facility or an ORM framework such as Hibernate. · IllegalClassReference rule (generic) - Checks for reference to any of the classes configured in classNames. Bug Fixes and Enhancements · #3325147: Fix for running CodeNarc with a Groovy 1.8 runtime. There should no longer be StackOverflowExceptions. · #3317632: CloneableWithoutClone - false positive. · #3315990: StaticXxxField false positive on initializer: StaticSimpleDateFormatField, StaticDateFormatField, StaticCalendarField. · #3314773: UnnecessaryGroovyImportRule: false positive on static imports · #3315992: ClosureAsLastMethodParameter - false positive, when method call surrounded by parentheses. · #3307699: Fixed a typo and made some "Violation" strings lowercase, so the log messages are consistent. (Fixed by René Scheibe) · #3315946: Cmdline runner does not respect -includes and -excludes. (Fixed by René Scheibe) · #3314576: UnnecessaryPublicModifierRule: MissingPropertyException. (Fixed by René Scheibe) · #3322395: JUnitTestMethodWithoutAssert - Added support for parameters in the @Test annotation. E.g.: @Test(expected = IllegalArgumentException) and @Test(timeout = 1000). (Fixed by René Scheibe) · #3310381: Added test for all rules (in AbstractRuleTestCase) to verify that any values specified for (doNot)applyToFilesMatching are valid regular expressions. · #3325049: Change StatelessClassRule (generic) to require applyToClassNames, applyToFileNames or applyToFilesMatching to be configured. · #3361263: IllegalPackageReferenceRule: Also check constructor parameter types and type coercion (x as Type). · #3315991: Unnecessary*Instantiation (including UnnecessaryBigDecimalInstantiation): Duplicate violations. · #3351964: Include rules w/ priority > 4 in HTML report. Add getViolations() to Results interface. · #3375718: UnusedPrivateField: Recognize references to static fields through the class name. · #3380494: Automatically create report output folders. · #3376518: UnnecessaryBigDecimalInstantiation should not produce violations for new BigDecimal(42), new BigDecimal(42L) or new BigDecimal("42") - i.e., when the parameter evaluates to an integer/long. · #3376576: UnnecessaryParenthesesForMethodCallWithClosureRule: IllegalArgumentException: Start and end indexes are one based and have to be greater than zero. · #3384056: Unnecessary* rules should be priority 3. Thanks * Thanks to René Scheibe for the UnnecessaryDefInVariableDeclarationRule and enhancements to UnnecessaryDefInMethodDeclarationRule; as well as the many bug fixes. * Thanks to Dean Del Ponte for the UnnecessaryDotClass rule. * Thanks to Nick Larson, Juan Vazquez, and Jon DeJong for the AssignCollectionUnique rule. * Thanks to Jeff Beck for the BitwiseOperatorInConditional rule. * Thanks to Geli Crick and Rafael Luque for the BracesForClass, LineLength, GrailsDomainHasToString,GrailsDomainHasEquals, BracesForIfElseRule, BracesForMethod, BracesForTryCatchFinally and ClassJavadoc rules. Visit the CodeNarc Home Page <http://codenarc.sourceforge.net/> |
From: Hamlet D'A. <ham...@gm...> - 2011-08-01 07:25:00
|
Hi all, As many know, running CodeNarc 0.14 with a Groovy 1.8 runtime produces many stack overflow exceptions. This issue is fixed in the next release, 0.15. The problem is a base problem with Groovy. Method dispatch to the super class is subtly broken in some class hierarchies when the parent class is compiled Java. It would be nice if you would vote for the issue so that we can remove the workaround from our codebase: http://jira.codehaus.org/browse/GROOVY-4922 Note for CodeNarc Developers: I am tempted to rewrite our AST visitor classes and ASTUtil classes in Java, and the rules themselves can be left in Groovy. The underlying problem of method dispatch between code compiled with 1.7 and running with 1.8 remains and is worrying. The rewrite of that small part of CodeNarc would fix the problem for good and also give some nice performance improvements. I feel like CodeNarc is at the same place Gradle was about 2 years ago... the core is implemented in Groovy but as the project grows the benefits of a Java core start to show themselves. With a Java core we'll have a little more safety, a little better performance, and a little more room to grow. What do you think? Thanks, -- Hamlet D'Arcy ham...@gm... |
From: Hamlet D. <ham...@ca...> - 2011-07-04 15:07:03
|
The website sometimes has fuller descriptions of the errors: http://codenarc.sourceforge.net/codenarc-rules-unnecessary.html "String objects should be created with single quotes, and GString objects created with double quotes. Creating normal String objects with double quotes is confusing to readers." Yes the compiler allows you to create a String with "", but if your intent is to create a String then use ''. Feel free to turn this rule off if you disagree :) ----- Original Message ----- > > Hi, > > > Why does using > ----------------------- > def x = "" > ----------------------- > > > result in " UnnecessaryGString " error? > > > It's not a GString that Groovy gives here, right? > > > > -- > Roshan > Blog: http://roshandawrani.wordpress.com/ > Twitter: @roshandawrani > Skype: roshandawrani > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously > valuable. > Why? It contains a definitive record of application performance, > security > threats, fraudulent activity, and more. Splunk takes this data and > makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > |
From: Roshan D. <ros...@gm...> - 2011-07-04 14:39:20
|
Hi, Why does using ----------------------- def x = "" ----------------------- result in "UnnecessaryGString" error? It's not a GString that Groovy gives here, right? -- Roshan Blog: http://roshandawrani.wordpress.com/ Twitter: @roshandawrani <http://twitter.com/roshandawrani> Skype: roshandawrani |
From: Hamlet D. <ham...@ca...> - 2011-07-04 14:25:48
|
Honestly, I think the CodeNarc handling of versions is semantically correct: major.minor.revision 0.14 does not represent one-tenth improvement over 0.13, it represents one minor release beyond 0.13. Version numbers are not meant to be compared as floats. So 1.14.0 is > 1.9.0. ----- Original Message ----- > > On Mon, Jul 4, 2011 at 7:46 PM, Hamlet DArcy < ham...@ca... > > wrote: > > > Yes, the number 14 is bigger than 9. How else does one compare > numbers? ;) > > > > I just hope that the same logic is not applied after it goes beyond > release 1.0 (1.14 vs 1.9) ;-) |
From: Roshan D. <ros...@gm...> - 2011-07-04 14:19:28
|
On Mon, Jul 4, 2011 at 7:46 PM, Hamlet DArcy <ham...@ca...> wrote: > Yes, the number 14 is bigger than 9. How else does one compare numbers? ;) > I just hope that the same logic is not applied after it goes beyond release 1.0 (1.14 vs 1.9) ;-) |
From: Hamlet D. <ham...@ca...> - 2011-07-04 14:16:20
|
Yes, the number 14 is bigger than 9. How else does one compare numbers? ;) Going forward, the versions of CodeNarc and the versions of the Grails plugin should be in sync. ----- Original Message ----- > I am on CN 0.9 > > > Is that newer than 0.14 or older? :-) > > > On Mon, Jul 4, 2011 at 7:38 PM, Hamlet DArcy < ham...@ca... > > wrote: > > > When I do a "grails list-plugins" then I see this line: > > codenarc <0.14> -- CodeNarc plugin > > So it should be up to date and ready to install. > > > > > > ----- Original Message ----- > > Great. Thanks. > > > > > > Waiting for this fixed CodeNarc to be available soon through its > > Grails plugin. > > > > > > On Mon, Jul 4, 2011 at 7:27 PM, Hamlet DArcy < > > ham...@ca... > > > wrote: > > > > > > Yes, I checked the behavior. It does not give a warning for your > > code > > other than "UnnecessaryOverridingMethod". That is the one and only > > warning produced. It does not look at the return type of clone(). > > > > > > > > > > > > ----- Original Message ----- > > > > > > On Mon, Jul 4, 2011 at 7:18 PM, Hamlet DArcy < > > > ham...@ca... > > > > wrote: > > > > > > > > > CodeNarc 0.14 does not give a warning for your code. It does > > > however > > > give this warning: > > > > > > line: 2 UnnecessaryOverridingMethod The method clone contains no > > > logic and can be safely deleted source: Dummy clone() > > > {super.clone()} > > > > > > > > > > > > No, no. This error is obvious and irrelevant to my question, > > > that's > > > why I was trying to keep it out of the discussion :-) > > > > > > > > > I am getting "CloneableWithoutClone" and my code defines a > > > covariant > > > clone() like below: > > > > > > > > > class Dummy implements Cloneable { > > > Dummy clone() { > > > super.clone() > > > // some more stuff > > > } > > > } > > > > > > > > > Can anyone please check the behavior in case of co-variant > > > clone()? > > > > > > -- > > > Roshan > > > Blog: http://roshandawrani.wordpress.com/ > > > Twitter: @roshandawrani > > > Skype: roshandawrani > > > > > > > > > > > > |
From: Roshan D. <ros...@gm...> - 2011-07-04 14:09:57
|
I am on CN 0.9 Is that newer than 0.14 or older? :-) On Mon, Jul 4, 2011 at 7:38 PM, Hamlet DArcy <ham...@ca...> wrote: > When I do a "grails list-plugins" then I see this line: > > codenarc <0.14> -- CodeNarc plugin > > So it should be up to date and ready to install. > > > ----- Original Message ----- > > Great. Thanks. > > > > > > Waiting for this fixed CodeNarc to be available soon through its > > Grails plugin. > > > > > > On Mon, Jul 4, 2011 at 7:27 PM, Hamlet DArcy < ham...@ca... > > > wrote: > > > > > > Yes, I checked the behavior. It does not give a warning for your code > > other than "UnnecessaryOverridingMethod". That is the one and only > > warning produced. It does not look at the return type of clone(). > > > > > > > > > > > > ----- Original Message ----- > > > > > > On Mon, Jul 4, 2011 at 7:18 PM, Hamlet DArcy < > > > ham...@ca... > > > > wrote: > > > > > > > > > CodeNarc 0.14 does not give a warning for your code. It does > > > however > > > give this warning: > > > > > > line: 2 UnnecessaryOverridingMethod The method clone contains no > > > logic and can be safely deleted source: Dummy clone() > > > {super.clone()} > > > > > > > > > > > > No, no. This error is obvious and irrelevant to my question, that's > > > why I was trying to keep it out of the discussion :-) > > > > > > > > > I am getting "CloneableWithoutClone" and my code defines a > > > covariant > > > clone() like below: > > > > > > > > > class Dummy implements Cloneable { > > > Dummy clone() { > > > super.clone() > > > // some more stuff > > > } > > > } > > > > > > > > > Can anyone please check the behavior in case of co-variant clone()? > > > > > > -- > > > Roshan > > > Blog: http://roshandawrani.wordpress.com/ > > > Twitter: @roshandawrani > > > Skype: roshandawrani > > > > > > > > > > > |
From: Hamlet D. <ham...@ca...> - 2011-07-04 14:08:15
|
When I do a "grails list-plugins" then I see this line: codenarc <0.14> -- CodeNarc plugin So it should be up to date and ready to install. ----- Original Message ----- > Great. Thanks. > > > Waiting for this fixed CodeNarc to be available soon through its > Grails plugin. > > > On Mon, Jul 4, 2011 at 7:27 PM, Hamlet DArcy < ham...@ca... > > wrote: > > > Yes, I checked the behavior. It does not give a warning for your code > other than "UnnecessaryOverridingMethod". That is the one and only > warning produced. It does not look at the return type of clone(). > > > > > > ----- Original Message ----- > > > > On Mon, Jul 4, 2011 at 7:18 PM, Hamlet DArcy < > > ham...@ca... > > > wrote: > > > > > > CodeNarc 0.14 does not give a warning for your code. It does > > however > > give this warning: > > > > line: 2 UnnecessaryOverridingMethod The method clone contains no > > logic and can be safely deleted source: Dummy clone() > > {super.clone()} > > > > > > > > No, no. This error is obvious and irrelevant to my question, that's > > why I was trying to keep it out of the discussion :-) > > > > > > I am getting "CloneableWithoutClone" and my code defines a > > covariant > > clone() like below: > > > > > > class Dummy implements Cloneable { > > Dummy clone() { > > super.clone() > > // some more stuff > > } > > } > > > > > > Can anyone please check the behavior in case of co-variant clone()? > > > > -- > > Roshan > > Blog: http://roshandawrani.wordpress.com/ > > Twitter: @roshandawrani > > Skype: roshandawrani > > > > > > |
From: Roshan D. <ros...@gm...> - 2011-07-04 13:59:32
|
Great. Thanks. Waiting for this fixed CodeNarc to be available soon through its Grails plugin. On Mon, Jul 4, 2011 at 7:27 PM, Hamlet DArcy <ham...@ca...> wrote: > Yes, I checked the behavior. It does not give a warning for your code other > than "UnnecessaryOverridingMethod". That is the one and only warning > produced. It does not look at the return type of clone(). > > > ----- Original Message ----- > > > > On Mon, Jul 4, 2011 at 7:18 PM, Hamlet DArcy < ham...@ca... > > > wrote: > > > > > > CodeNarc 0.14 does not give a warning for your code. It does however > > give this warning: > > > > line: 2 UnnecessaryOverridingMethod The method clone contains no > > logic and can be safely deleted source: Dummy clone() > > {super.clone()} > > > > > > > > No, no. This error is obvious and irrelevant to my question, that's > > why I was trying to keep it out of the discussion :-) > > > > > > I am getting "CloneableWithoutClone" and my code defines a covariant > > clone() like below: > > > > > > class Dummy implements Cloneable { > > Dummy clone() { > > super.clone() > > // some more stuff > > } > > } > > > > > > Can anyone please check the behavior in case of co-variant clone()? > > > > -- > > Roshan > > Blog: http://roshandawrani.wordpress.com/ > > Twitter: @roshandawrani > > Skype: roshandawrani > > > > > |
From: Hamlet D. <ham...@ca...> - 2011-07-04 13:57:15
|
Yes, I checked the behavior. It does not give a warning for your code other than "UnnecessaryOverridingMethod". That is the one and only warning produced. It does not look at the return type of clone(). ----- Original Message ----- > > On Mon, Jul 4, 2011 at 7:18 PM, Hamlet DArcy < ham...@ca... > > wrote: > > > CodeNarc 0.14 does not give a warning for your code. It does however > give this warning: > > line: 2 UnnecessaryOverridingMethod The method clone contains no > logic and can be safely deleted source: Dummy clone() > {super.clone()} > > > > No, no. This error is obvious and irrelevant to my question, that's > why I was trying to keep it out of the discussion :-) > > > I am getting "CloneableWithoutClone" and my code defines a covariant > clone() like below: > > > class Dummy implements Cloneable { > Dummy clone() { > super.clone() > // some more stuff > } > } > > > Can anyone please check the behavior in case of co-variant clone()? > > -- > Roshan > Blog: http://roshandawrani.wordpress.com/ > Twitter: @roshandawrani > Skype: roshandawrani > > |
From: Roshan D. <ros...@gm...> - 2011-07-04 13:53:50
|
On Mon, Jul 4, 2011 at 7:18 PM, Hamlet DArcy <ham...@ca...> wrote: > CodeNarc 0.14 does not give a warning for your code. It does however give > this warning: > > line: 2 UnnecessaryOverridingMethod The method clone contains no logic and > can be safely deleted source: Dummy clone() {super.clone()} > No, no. This error is obvious and irrelevant to my question, that's why I was trying to keep it out of the discussion :-) I am getting "CloneableWithoutClone" and my code defines a covariant clone() like below: class Dummy implements Cloneable { Dummy clone() { super.clone() // some more stuff } } Can anyone please check the behavior in case of co-variant clone()? -- Roshan Blog: http://roshandawrani.wordpress.com/ Twitter: @roshandawrani <http://twitter.com/roshandawrani> Skype: roshandawrani |
From: Hamlet D. <ham...@ca...> - 2011-07-04 13:48:54
|
CodeNarc 0.14 does not give a warning for your code. It does however give this warning: line: 2 UnnecessaryOverridingMethod The method clone contains no logic and can be safely deleted source: Dummy clone() {super.clone()} But that seems OK... you're overriding a method from the parent and doing nothing other than calling the parent. ----- Original Message ----- > No, it shouldn't, I think, but I wanted to see how it behaves there > and wasn't able to know due to the bug in the currently released > version. > > Did you try it by the way? Because with CodeNarc Grails plugin 0.9, > we are seeing CN warnings about such cloning, which is why I started > trying it in the first place. > > --------------------------------------------------- > Sent from BlackBerry > > -----Original Message----- > From: Hamlet DArcy <ham...@ca...> > Date: Mon, 04 Jul 2011 15:39:55 > To: Roshan Dawrani<ros...@gm...> > Cc: <cod...@li...>; René > Scheibe<ren...@go...> > Subject: Re: [Codenarc-user] implementing Cloneable > > It doesn't look at the return type. > > Should it? It probably doesn't matter. > > > ----- Original Message ----- > > > > That sounds good, Rene. However, it stops me from trying what I > > originally wanted to try (since I am not on codenarc dev snapshot, > > but using it through Codenarc Grails plugin 0.9) > > > > > > My original intent was to see the CodeNarc behavior for covariant > > methods, i.e., if my code is: > > > > > > ---------------------------------------------------------- > > class Dummy implements Cloneable { > > Dummy clone() {super.clone()} > > } > > ---------------------------------------------------------- > > > > > > Does CodeNarc like this covariant method or not is what I wanted to > > see. Would it possible for you to give a quick check? > > > > > > Thanks. > > > > > > > > > > On Mon, Jul 4, 2011 at 6:47 PM, René Scheibe < > > ren...@go... > wrote: > > > > > > There is bug in v0.14. It's already fixed in the current > > development > > version > > ( > > http://sourceforge.net/tracker/?func=detail&aid=3317632&group_id=250145&atid=1126573 > > ). > > It will be rolled out with the next release. > > > > Regards, > > René Scheibe > > > > > > > > > > > > On 07/04/2011 02:28 PM, Roshan Dawrani wrote: > > > Hi, > > > > > > Can someone help me see what is wrong in the following code: > > > ------------------------------------------------------------------------------- > > > class Dummy implements Cloneable { > > > Object clone() { > > > super.clone() > > > } > > > } > > > ------------------------------------------------------------------------------- > > > > > > CodeNarc output shows and I can't figure out how to make it > > > happy: > > > ------------------------------------------------------------------------------- > > > line: 1 CloneableWithoutClone The class Dummy implements > > > Cloneable > > > but > > > does not define a proper clone() method source: class Dummy > > > implements > > > Cloneable { > > > ------------------------------------------------------------------------------- > > > > > > -- > > > Roshan > > > Blog: http://roshandawrani.wordpress.com/ > > > Twitter: @roshandawrani < http://twitter.com/roshandawrani > > > > > > > > > > Skype: roshandawrani > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > All of the data generated in your IT infrastructure is seriously > > > valuable. > > > Why? It contains a definitive record of application performance, > > > security > > > threats, fraudulent activity, and more. Splunk takes this data > > > and > > > makes > > > sense of it. IT sense. And common sense. > > > http://p.sf.net/sfu/splunk-d2d-c2 > > > > > > > > > > > >_______________________________________________ > > > Codenarc-user mailing list > > > Cod...@li... > > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously > > valuable. > > Why? It contains a definitive record of application performance, > > security > > threats, fraudulent activity, and more. Splunk takes this data and > > makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > >_______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > > > > > -- > > Roshan > > Blog: http://roshandawrani.wordpress.com/ > > Twitter: @roshandawrani > > Skype: roshandawrani > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously > > valuable. > > Why? It contains a definitive record of application performance, > > security > > threats, fraudulent activity, and more. Splunk takes this data and > > makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > >_______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > |
From: Hamlet D. <ham...@ca...> - 2011-07-04 13:46:25
|
it should work again. ----- Original Message ----- > OK, I will try and fix this. > > It looks like reflection is being used and GAE doesn't like that. > > > > ----- Original Message ----- > > > > Hi, > > > > > > I am trying to use CodeNarc Web Console first time today, and am > > wondering if I am using it right. > > > > > > I am trying to run the following piece of code: > > --------------------------------------------------------------------- > > class Dummy { } > > > > def d = new Dummy ( ) > > > > --------------------------------------------------------------------- > > and it seems to be resulting in: > > > > --------------------------------------------------------------------- > > java.lang.IllegalAccessException: Reflection is not allowed on > > java.lang.String java.lang.ThreadGroup.name at > > org.codenarc.rule.concurrency.ThreadGroupAstVisitor.isConstructorNamed(ThreadGroupRule.groovy:57) > > at > > org.codenarc.rule.concurrency.ThreadGroupAstVisitor.visitConstructorCallExpression(ThreadGroupRule.groovy:40) > > at > > org.codenarc.rule.AbstractAstVisitor.super$3$visitConstructorOrMethod(AbstractAstVisitor.groovy) > > at > > org.codenarc.rule.AbstractAstVisitor$_visitConstructorOrMethod_closure4.doCall(AbstractAstVisitor.groovy:186) > > at > > org.codenarc.rule.AbstractAstVisitor$_visitConstructorOrMethod_closure4.doCall(AbstractAstVisitor.groovy) > > > > --------------------------------------------------------------------- > > > > -- > > Roshan > > Blog: http://roshandawrani.wordpress.com/ > > Twitter: @roshandawrani > > Skype: roshandawrani > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously > > valuable. > > Why? It contains a definitive record of application performance, > > security > > threats, fraudulent activity, and more. Splunk takes this data and > > makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > > _______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously > valuable. > Why? It contains a definitive record of application performance, > security > threats, fraudulent activity, and more. Splunk takes this data and > makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > |
From: <ros...@gm...> - 2011-07-04 13:45:49
|
No, it shouldn't, I think, but I wanted to see how it behaves there and wasn't able to know due to the bug in the currently released version. Did you try it by the way? Because with CodeNarc Grails plugin 0.9, we are seeing CN warnings about such cloning, which is why I started trying it in the first place. --------------------------------------------------- Sent from BlackBerry -----Original Message----- From: Hamlet DArcy <ham...@ca...> Date: Mon, 04 Jul 2011 15:39:55 To: Roshan Dawrani<ros...@gm...> Cc: <cod...@li...>; René Scheibe<ren...@go...> Subject: Re: [Codenarc-user] implementing Cloneable It doesn't look at the return type. Should it? It probably doesn't matter. ----- Original Message ----- > > That sounds good, Rene. However, it stops me from trying what I > originally wanted to try (since I am not on codenarc dev snapshot, > but using it through Codenarc Grails plugin 0.9) > > > My original intent was to see the CodeNarc behavior for covariant > methods, i.e., if my code is: > > > ---------------------------------------------------------- > class Dummy implements Cloneable { > Dummy clone() {super.clone()} > } > ---------------------------------------------------------- > > > Does CodeNarc like this covariant method or not is what I wanted to > see. Would it possible for you to give a quick check? > > > Thanks. > > > > > On Mon, Jul 4, 2011 at 6:47 PM, René Scheibe < > ren...@go... > wrote: > > > There is bug in v0.14. It's already fixed in the current development > version > ( > http://sourceforge.net/tracker/?func=detail&aid=3317632&group_id=250145&atid=1126573 > ). > It will be rolled out with the next release. > > Regards, > René Scheibe > > > > > > On 07/04/2011 02:28 PM, Roshan Dawrani wrote: > > Hi, > > > > Can someone help me see what is wrong in the following code: > > ------------------------------------------------------------------------------- > > class Dummy implements Cloneable { > > Object clone() { > > super.clone() > > } > > } > > ------------------------------------------------------------------------------- > > > > CodeNarc output shows and I can't figure out how to make it happy: > > ------------------------------------------------------------------------------- > > line: 1 CloneableWithoutClone The class Dummy implements Cloneable > > but > > does not define a proper clone() method source: class Dummy > > implements > > Cloneable { > > ------------------------------------------------------------------------------- > > > > -- > > Roshan > > Blog: http://roshandawrani.wordpress.com/ > > Twitter: @roshandawrani < http://twitter.com/roshandawrani > > > > > > Skype: roshandawrani > > > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously > > valuable. > > Why? It contains a definitive record of application performance, > > security > > threats, fraudulent activity, and more. Splunk takes this data and > > makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > > > > > > > >_______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously > valuable. > Why? It contains a definitive record of application performance, > security > threats, fraudulent activity, and more. Splunk takes this data and > makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 >_______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > -- > Roshan > Blog: http://roshandawrani.wordpress.com/ > Twitter: @roshandawrani > Skype: roshandawrani > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously > valuable. > Why? It contains a definitive record of application performance, > security > threats, fraudulent activity, and more. Splunk takes this data and > makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 >_______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > |
From: Hamlet D. <ham...@ca...> - 2011-07-04 13:40:14
|
It doesn't look at the return type. Should it? It probably doesn't matter. ----- Original Message ----- > > That sounds good, Rene. However, it stops me from trying what I > originally wanted to try (since I am not on codenarc dev snapshot, > but using it through Codenarc Grails plugin 0.9) > > > My original intent was to see the CodeNarc behavior for covariant > methods, i.e., if my code is: > > > ---------------------------------------------------------- > class Dummy implements Cloneable { > Dummy clone() {super.clone()} > } > ---------------------------------------------------------- > > > Does CodeNarc like this covariant method or not is what I wanted to > see. Would it possible for you to give a quick check? > > > Thanks. > > > > > On Mon, Jul 4, 2011 at 6:47 PM, René Scheibe < > ren...@go... > wrote: > > > There is bug in v0.14. It's already fixed in the current development > version > ( > http://sourceforge.net/tracker/?func=detail&aid=3317632&group_id=250145&atid=1126573 > ). > It will be rolled out with the next release. > > Regards, > René Scheibe > > > > > > On 07/04/2011 02:28 PM, Roshan Dawrani wrote: > > Hi, > > > > Can someone help me see what is wrong in the following code: > > ------------------------------------------------------------------------------- > > class Dummy implements Cloneable { > > Object clone() { > > super.clone() > > } > > } > > ------------------------------------------------------------------------------- > > > > CodeNarc output shows and I can't figure out how to make it happy: > > ------------------------------------------------------------------------------- > > line: 1 CloneableWithoutClone The class Dummy implements Cloneable > > but > > does not define a proper clone() method source: class Dummy > > implements > > Cloneable { > > ------------------------------------------------------------------------------- > > > > -- > > Roshan > > Blog: http://roshandawrani.wordpress.com/ > > Twitter: @roshandawrani < http://twitter.com/roshandawrani > > > > > > Skype: roshandawrani > > > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously > > valuable. > > Why? It contains a definitive record of application performance, > > security > > threats, fraudulent activity, and more. Splunk takes this data and > > makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > > > > > > > > _______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously > valuable. > Why? It contains a definitive record of application performance, > security > threats, fraudulent activity, and more. Splunk takes this data and > makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > -- > Roshan > Blog: http://roshandawrani.wordpress.com/ > Twitter: @roshandawrani > Skype: roshandawrani > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously > valuable. > Why? It contains a definitive record of application performance, > security > threats, fraudulent activity, and more. Splunk takes this data and > makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > |
From: Roshan D. <ros...@gm...> - 2011-07-04 13:26:27
|
That sounds good, Rene. However, it stops me from trying what I originally wanted to try (since I am not on codenarc dev snapshot, but using it through Codenarc Grails plugin 0.9) My original intent was to see the CodeNarc behavior for covariant methods, i.e., if my code is: ---------------------------------------------------------- class Dummy implements Cloneable { Dummy clone() {super.clone()} } ---------------------------------------------------------- Does CodeNarc like this covariant method or not is what I wanted to see. Would it possible for you to give a quick check? Thanks. On Mon, Jul 4, 2011 at 6:47 PM, René Scheibe <ren...@go...>wrote: > There is bug in v0.14. It's already fixed in the current development > version > ( > http://sourceforge.net/tracker/?func=detail&aid=3317632&group_id=250145&atid=1126573 > ). > It will be rolled out with the next release. > > Regards, > René Scheibe > > > On 07/04/2011 02:28 PM, Roshan Dawrani wrote: > > Hi, > > > > Can someone help me see what is wrong in the following code: > > > ------------------------------------------------------------------------------- > > class Dummy implements Cloneable { > > Object clone() { > > super.clone() > > } > > } > > > ------------------------------------------------------------------------------- > > > > CodeNarc output shows and I can't figure out how to make it happy: > > > ------------------------------------------------------------------------------- > > line: 1 CloneableWithoutClone The class Dummy implements Cloneable but > > does not define a proper clone() method source: class Dummy implements > > Cloneable { > > > ------------------------------------------------------------------------------- > > > > -- > > Roshan > > Blog: http://roshandawrani.wordpress.com/ > > Twitter: @roshandawrani <http://twitter.com/roshandawrani> > > Skype: roshandawrani > > > > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously > valuable. > > Why? It contains a definitive record of application performance, security > > threats, fraudulent activity, and more. Splunk takes this data and makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > > > > > > > > _______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > -- Roshan Blog: http://roshandawrani.wordpress.com/ Twitter: @roshandawrani <http://twitter.com/roshandawrani> Skype: roshandawrani |
From: R. S. <ren...@go...> - 2011-07-04 13:18:12
|
There is bug in v0.14. It's already fixed in the current development version (http://sourceforge.net/tracker/?func=detail&aid=3317632&group_id=250145&atid=1126573). It will be rolled out with the next release. Regards, René Scheibe On 07/04/2011 02:28 PM, Roshan Dawrani wrote: > Hi, > > Can someone help me see what is wrong in the following code: > ------------------------------------------------------------------------------- > class Dummy implements Cloneable { > Object clone() { > super.clone() > } > } > ------------------------------------------------------------------------------- > > CodeNarc output shows and I can't figure out how to make it happy: > ------------------------------------------------------------------------------- > line: 1 CloneableWithoutClone The class Dummy implements Cloneable but > does not define a proper clone() method source: class Dummy implements > Cloneable { > ------------------------------------------------------------------------------- > > -- > Roshan > Blog: http://roshandawrani.wordpress.com/ > Twitter: @roshandawrani <http://twitter.com/roshandawrani> > Skype: roshandawrani > > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > > > > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user |
From: Roshan D. <ros...@gm...> - 2011-07-04 13:06:48
|
whatever is on codenarc web console. On Mon, Jul 4, 2011 at 6:35 PM, Hamlet DArcy <ham...@ca...> wrote: > What version is this? > > ----- Original Message ----- > > No, it doesn't fix the error. > > > > > > In fact adds one more error to the mix "UnnecessaryPublicModifier The > > public keyword is unnecessary for methods source: public Object > > clone() {" > > > > > > > > > > On Mon, Jul 4, 2011 at 6:30 PM, Hamlet DArcy < ham...@ca... > > > wrote: > > > > > > Interesting... if you add the public modifier, does it fix the error? > > All of our test cases have the public modifier in it, so this is a > > case we didn't test. > > > > We check for a clone method like this: > > > > ClassNode classNode = ... > > boolean hasMethod = classNode.getDeclaredMethod('clone', [] as > > Parameter[]) > > > > > > > > > > > > ----- Original Message ----- > > > > > > > > > Hi, > > > > > > > > > Can someone help me see what is wrong in the following code: > > > > ------------------------------------------------------------------------------- > > > class Dummy implements Cloneable { > > > Object clone ( ) { > > > super . clone ( ) > > > } > > > } > > > > ------------------------------------------------------------------------------- > > > > > > CodeNarc output shows and I can't figure out how to make it happy: > > > > > > > ------------------------------------------------------------------------------- > > > line: 1 CloneableWithoutClone The class Dummy implements Cloneable > > > but does not define a proper clone() method source: class Dummy > > > implements Cloneable { > > > > > > > ------------------------------------------------------------------------------- > > > > > > -- > > > Roshan > > > Blog: http://roshandawrani.wordpress.com/ > > > Twitter: @roshandawrani > > > Skype: roshandawrani > > > > > > > > > > ------------------------------------------------------------------------------ > > > All of the data generated in your IT infrastructure is seriously > > > valuable. > > > Why? It contains a definitive record of application performance, > > > security > > > threats, fraudulent activity, and more. Splunk takes this data and > > > makes > > > sense of it. IT sense. And common sense. > > > http://p.sf.net/sfu/splunk-d2d-c2 > > > _______________________________________________ > > > Codenarc-user mailing list > > > Cod...@li... > > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > > > > > > > > -- > > Roshan > > Blog: http://roshandawrani.wordpress.com/ > > Twitter: @roshandawrani > > Skype: roshandawrani > > > > > |
From: Hamlet D. <ham...@ca...> - 2011-07-04 13:06:01
|
What version is this? ----- Original Message ----- > No, it doesn't fix the error. > > > In fact adds one more error to the mix "UnnecessaryPublicModifier The > public keyword is unnecessary for methods source: public Object > clone() {" > > > > > On Mon, Jul 4, 2011 at 6:30 PM, Hamlet DArcy < ham...@ca... > > wrote: > > > Interesting... if you add the public modifier, does it fix the error? > All of our test cases have the public modifier in it, so this is a > case we didn't test. > > We check for a clone method like this: > > ClassNode classNode = ... > boolean hasMethod = classNode.getDeclaredMethod('clone', [] as > Parameter[]) > > > > > > ----- Original Message ----- > > > > > > Hi, > > > > > > Can someone help me see what is wrong in the following code: > > ------------------------------------------------------------------------------- > > class Dummy implements Cloneable { > > Object clone ( ) { > > super . clone ( ) > > } > > } > > ------------------------------------------------------------------------------- > > > > CodeNarc output shows and I can't figure out how to make it happy: > > > > ------------------------------------------------------------------------------- > > line: 1 CloneableWithoutClone The class Dummy implements Cloneable > > but does not define a proper clone() method source: class Dummy > > implements Cloneable { > > > > ------------------------------------------------------------------------------- > > > > -- > > Roshan > > Blog: http://roshandawrani.wordpress.com/ > > Twitter: @roshandawrani > > Skype: roshandawrani > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously > > valuable. > > Why? It contains a definitive record of application performance, > > security > > threats, fraudulent activity, and more. Splunk takes this data and > > makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > > _______________________________________________ > > Codenarc-user mailing list > > Cod...@li... > > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > > > > > -- > Roshan > Blog: http://roshandawrani.wordpress.com/ > Twitter: @roshandawrani > Skype: roshandawrani > > |