codenarc-developer Mailing List for CodeNarc (Page 13)
Brought to you by:
chrismair
This list is closed, nobody may subscribe to it.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
(17) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
(67) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(23) |
Feb
(19) |
Mar
(15) |
Apr
(7) |
May
(5) |
Jun
(43) |
Jul
(5) |
Aug
(11) |
Sep
(18) |
Oct
(9) |
Nov
(6) |
Dec
|
2012 |
Jan
(7) |
Feb
(2) |
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
(17) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
(1) |
Mar
(7) |
Apr
|
May
(6) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(6) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <chr...@wa...> - 2010-11-09 12:13:35
|
Agreed. That was already on my own to-do list. I just wanted to get that stuff checked in. Will plan to implement that this evening. Thanks. Chris Hamlet DArcy <ham...@ca...> 11/09/2010 05:09 AM To cod...@li... cc Subject [Codenarc-developer] new literal rules Chris, The new Number and String literal rules should really have an ignore list. 0 and 1 are very common numbers and it would be nice to be able to ignore those. -- Hamlet D'Arcy ham...@ca... ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Codenarc-developer mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-developer ForwardSourceID:NT000CE0F2 |
From: Hamlet D. <ham...@ca...> - 2010-11-09 10:09:26
|
Chris, The new Number and String literal rules should really have an ignore list. 0 and 1 are very common numbers and it would be nice to be able to ignore those. -- Hamlet D'Arcy ham...@ca... |
From: Chris M. <chr...@ea...> - 2010-11-08 23:57:15
|
Hamlet, I saw your new rule(s). Good stuff. Even before your latest check-in, I was considering creating a new "Unnecessary" ruleset, with all of the existing Unnecessary* rules and probably the two Useless* rules as well (perhaps renaming them to Unnecessary*). That will be a minor breaking change for anybody that already has an explicit dependency on the package name for the 2 or 3 Unnecessary* rules that were released in previous versions. That will only cause an issue if people explicitly included those individual rule classes rather than getting them from the Basic ruleset. But that also fits into my philosophy for the Basic ruleset to be universal, while some of those Unnecessary rules are either just mildly annoying noise, or else stylistic preference. As always, let me know if you have objections. Chris |
From: Chris M. <chr...@ea...> - 2010-11-07 21:39:36
|
>> So, HA HA for once I get to tell you that your forget some docs instead of the other way around :) LOL. Yup, you got me. Actually, I was just wondering yesterday whether I should ask around if anyone was even using the command-line facility, and if not, deprecate it. Scripting the Ant task using the built-in AntBuilder is pretty simple, but it sounds like you are actually using it, so that's cool. It was on my to-do list to get a SourceAnalyzer implementation for Subversion (and then eventually for Git) that would reach into a repo and extract the files. But I hadn't gone far down that path. I was expecting to need an SVN Java API. The solution you describe would require a locally-installed SVN, which of course has trade-offs. But that is an interesting approach. This is new territory. If it is just the command-line flag name you are asking about, why don't you come up with an implementation you think is reasonable, and if need be, we can argue about the name later. Would you see this eventually being usable from the Ant task as well? Chris -----Original Message----- From: Hamlet D'Arcy [mailto:ham...@gm...] Sent: Sunday, November 07, 2010 2:06 PM To: Cod...@li... Subject: Re: [Codenarc-developer] running codenarc in text mode from commandline on changeset It looks like Text is a report type and you can pass "text" to the command line... it just isn't documented! So, HA HA for once I get to tell you that your forget some docs instead of the other way around :) So my change request is to add a new command line attribute somehow to the CLI: "subversionedits" or something. What is your preferred syntax? -- Hamlet D'Arcy ham...@gm... On Sun, Nov 7, 2010 at 8:00 PM, Hamlet D'Arcy <ham...@gm...> wrote: > Hi Chris, > > A few things on the next release. > > I'd really like it to be before/on Devoxx, in 9 days from now. Is that > possible? I would guess so. > > I'd really like to be able to run codenarc from the command line with > standard text output. Is that possible today? It seems only XML/HTML > is supported as output I just want to dump the results to the console. > This is the start of simple IDE integration. Any IDE > (ultraedit/textmate included) lets you run an external command and > show the results in a window. Basically what I want is the same > results as the RunOnCodeNarc unit test. Just dump me the violations to > standard output as you find them. Would that be something you can do > before the release, or am I on my own? > > Lastly, I'd like the command line version to support running codenarc > on all the editable files in SVN. I have a script that creates the > correct command line, so you can see how easy it is to generate this. > I would think git support, etc. would be simple as well. Here is my > script to run: > > def text = "svn status".execute().text > > def includes = [] > text.eachLine { > if (it.endsWith('.groovy')) { > if (it.startsWith('M') || it.startsWith('A')) { > includes.add(it[1..-1].trim()) > } > } > } > > def includecmd = includes.join(',') > > println """Running codenarc on: > java org.codenarc.CodeNarc -includes=$includecmd > """ > > Seems simple, but will we have time? > > -- > Hamlet D'Arcy > ham...@gm... > ---------------------------------------------------------------------------- -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Codenarc-developer mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-developer |
From: Hamlet D'A. <ham...@gm...> - 2010-11-07 19:06:24
|
It looks like Text is a report type and you can pass "text" to the command line... it just isn't documented! So, HA HA for once I get to tell you that your forget some docs instead of the other way around :) So my change request is to add a new command line attribute somehow to the CLI: "subversionedits" or something. What is your preferred syntax? -- Hamlet D'Arcy ham...@gm... On Sun, Nov 7, 2010 at 8:00 PM, Hamlet D'Arcy <ham...@gm...> wrote: > Hi Chris, > > A few things on the next release. > > I'd really like it to be before/on Devoxx, in 9 days from now. Is that > possible? I would guess so. > > I'd really like to be able to run codenarc from the command line with > standard text output. Is that possible today? It seems only XML/HTML > is supported as output I just want to dump the results to the console. > This is the start of simple IDE integration. Any IDE > (ultraedit/textmate included) lets you run an external command and > show the results in a window. Basically what I want is the same > results as the RunOnCodeNarc unit test. Just dump me the violations to > standard output as you find them. Would that be something you can do > before the release, or am I on my own? > > Lastly, I'd like the command line version to support running codenarc > on all the editable files in SVN. I have a script that creates the > correct command line, so you can see how easy it is to generate this. > I would think git support, etc. would be simple as well. Here is my > script to run: > > def text = "svn status".execute().text > > def includes = [] > text.eachLine { > if (it.endsWith('.groovy')) { > if (it.startsWith('M') || it.startsWith('A')) { > includes.add(it[1..-1].trim()) > } > } > } > > def includecmd = includes.join(',') > > println """Running codenarc on: > java org.codenarc.CodeNarc -includes=$includecmd > """ > > Seems simple, but will we have time? > > -- > Hamlet D'Arcy > ham...@gm... > |
From: Hamlet D'A. <ham...@gm...> - 2010-11-07 19:00:30
|
Hi Chris, A few things on the next release. I'd really like it to be before/on Devoxx, in 9 days from now. Is that possible? I would guess so. I'd really like to be able to run codenarc from the command line with standard text output. Is that possible today? It seems only XML/HTML is supported as output I just want to dump the results to the console. This is the start of simple IDE integration. Any IDE (ultraedit/textmate included) lets you run an external command and show the results in a window. Basically what I want is the same results as the RunOnCodeNarc unit test. Just dump me the violations to standard output as you find them. Would that be something you can do before the release, or am I on my own? Lastly, I'd like the command line version to support running codenarc on all the editable files in SVN. I have a script that creates the correct command line, so you can see how easy it is to generate this. I would think git support, etc. would be simple as well. Here is my script to run: def text = "svn status".execute().text def includes = [] text.eachLine { if (it.endsWith('.groovy')) { if (it.startsWith('M') || it.startsWith('A')) { includes.add(it[1..-1].trim()) } } } def includecmd = includes.join(',') println """Running codenarc on: java org.codenarc.CodeNarc -includes=$includecmd """ Seems simple, but will we have time? -- Hamlet D'Arcy ham...@gm... |
From: Chris M. <chr...@ea...> - 2010-11-05 02:16:46
|
Hamlet, I like the new DuplicateLiteralRule. I am considering moving that to a different (maybe new) ruleset. That rule may not be as "universal" as I'd like for the basic ruleset. Plus, I know that once I release that, I'll have to turn it off immediately where I work or else face a deluge of violations in our tens of thousands of lines of existing Groovy code. And I assume the same when I generate my sample reports against Grails/Griffon. I am wondering whether there might be the opportunity for other similar rules, such as duplicate number literals? I notice you named the rule "duplicate literal", so you could cover that within the same rule. Or else perhaps have DuplicateStringLiteral and DuplicateNumberLiteral. (That might also depend on whether anyone would ever want to control or configure those separately) I might consider creating a "Duplication" or "Dry" ruleset, especially if there was the possibility of other similar rules. But perhaps even if not. I appreciate having someone else to bounce this off, so if you have a strong opinion, let me know. Chris |
From: Chris M. <chr...@ea...> - 2010-11-05 02:00:21
|
Hamlet, This is really great! I had wondered about doing something like this, along the lines of what PMD does. But again, you took it beyond, and made it better, than what I would have likely ended up with. I like your use of the standard @SupressWarnings annotation. Chris -----Original Message----- From: Hamlet D'Arcy [mailto:ham...@gm...] Sent: Thursday, November 04, 2010 11:39 AM To: Cod...@li... Subject: [Codenarc-developer] codenarc support for @SuppressWarnings Hi chris, I just checked in DuplicateLiteral. The interesting part is that you can suppress the rule by annotating the class or method with: @SuppressWarning('DuplicateLiteral') First off, you might want to search the CodeNarc codebase for this suppression and see where I had to use it. You may want to clean up some code. Secondly, there is a general way to add SuppressWarning support to all rules by modifying the base visitor. I am going to take a look at doing this. What do you think? -- Hamlet D'Arcy ham...@gm... ---------------------------------------------------------------------------- -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Codenarc-developer mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-developer |
From: Hamlet D'A. <ham...@gm...> - 2010-11-04 15:38:42
|
Hi chris, I just checked in DuplicateLiteral. The interesting part is that you can suppress the rule by annotating the class or method with: @SuppressWarning('DuplicateLiteral') First off, you might want to search the CodeNarc codebase for this suppression and see where I had to use it. You may want to clean up some code. Secondly, there is a general way to add SuppressWarning support to all rules by modifying the base visitor. I am going to take a look at doing this. What do you think? -- Hamlet D'Arcy ham...@gm... |
From: Chris M. <chr...@ea...> - 2010-11-01 02:13:15
|
Hamlet, I played around with upgrading CodeNarc to Gmaven 1.3 and Groovy 1.7. Of course it took than I expected. But it looks like I have it working, except the javadoc is empty (does not include any comments from the source code). That seems to be a known issue (http://jira.codehaus.org/browse/GMAVEN-68 and http://groovy.329449.n5.nabble.com/Is-GMaven-1-2-able-to-create-stubs-that-i nclude-JavaDoc-td364440.html) Other than that, the build and tests work (after I cleaned up a few incompatibilities), and the rest of the site files are generated, including the Cobertura test coverage. I even uncommented one of your commented-out tests to make sure that fixed it. I figured you would support moving forward with that(hopefully the javadoc issue will be fixed at some point), so I went ahead and checked in the changes. Let me know if you have any problems. I expect you should now be able to uncomment the rest of those 1.7-dependent tests. Chris -----Original Message----- From: Hamlet D'Arcy [mailto:ham...@gm...] Sent: Wednesday, October 27, 2010 3:43 PM To: Cod...@li... Subject: [Codenarc-developer] gmaven stuck on groovy 1.6 - Tests Failing Hi Chris, the maven build is failing because the test cases have anonymous inner classes, a feature of 1.7 not groovy 1.6. Can we upgrade to 1.7? -- Hamlet D'Arcy ham...@gm... ---------------------------------------------------------------------------- -- Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Codenarc-developer mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-developer |
From: Chris M. <chr...@ea...> - 2010-10-29 01:53:45
|
>> build scripts are something you can pay me to work on... but in my free time? I have to pass.... LOL I hear ya. I assume that we could fix the issues within the CodeNarc tests so that CLASS_GEN would work; at least part of that would involve removing references to classes outside the classpath. But then as soon as you try to run CodeNarc like that in the wild, it would crash (I think). I don't think that would be acceptable. I am also unsure if that would affect/break the CodeNarc Gradle plugin, or the Grails/Griffon plugins, or the Sonar plugin. I am still planning on looking into options for supporting that in an "optional" way. Chris -----Original Message----- From: Hamlet D'Arcy [mailto:ham...@gm...] Sent: Thursday, October 28, 2010 2:33 PM To: chr...@wa... Cc: Cod...@li... Subject: Re: [Codenarc-developer] build is clean again The big win for CLASS_GENERATION is the type information and return paths. If you can read both ReturnStatements and ClassNodes then you can start picking up a whole bunch of cool info reliably like returning null or returning unrelated classes. IMO it is important long term. I ran some tests against CLASS_GEN and saw some failures, but did not investigate. I would be surprised if it were a serious issue. Probably just some tests and rules need tweaking. I don't have a big desire to look into gmaven though. build scripts are something you can pay me to work on... but in my free time? I have to pass.... there are still plenty of rules to write without CLASS_GEN. As for the Groovy version... I think we should upgrade as soon as possible. You shouldn't need to upgrade the groovy version you compile with only the version you run codenarc with. But maybe I'm not thinking right. -- Hamlet D'Arcy ham...@gm... On Wed, Oct 27, 2010 at 10:14 PM, <chr...@wa...> wrote: Holy crap! You've been busy. Awesome! I just upped the version to Groovy 1.6 on the last release. I am a bit hesitant to go to 1.7 now. That will require many users to upgrade (like us). That may not be a huge deal; it will certainly have to happen sooner or later. But yes, I am also not looking forward to fooling around with the GMaven config. As I'm sure you noticed, where I needed to define "local" classes, I just put at the end of the same source file. It will be nice to have support for inner classes when we get there. If you feel that is important to do now, and you are willing to take a crack at the GMaven stuff, that is ok with me. Have you tested running those ClassGeneration rules against another code base with the application classes not in the classpath? Does it blow up, or just fail silently? Thanks so much. You da man! Chris "Hamlet D'Arcy" <ham...@gm...> 10/27/2010 04:02 PM To Cod...@li... cc Subject [Codenarc-developer] build is clean again the build is clean again and should build fine. There are a few commented out tests. Some tests fail because they use anonymous inner classes, a 1.7 feature that the build does not support. How hard is it to fix the build? I have heard that GMaven has problems here. Some tests fail because they can only be run in ClassGeneration. That's all, 9 new rules were added. -- Hamlet D'Arcy ham...@gm... ---------------------------------------------------------------------------- -- Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Codenarc-developer mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-developer ForwardSourceID:NT000CD312 |
From: Hamlet D'A. <ham...@gm...> - 2010-10-28 18:32:45
|
The big win for CLASS_GENERATION is the type information and return paths. If you can read both ReturnStatements and ClassNodes then you can start picking up a whole bunch of cool info reliably like returning null or returning unrelated classes. IMO it is important long term. I ran some tests against CLASS_GEN and saw some failures, but did not investigate. I would be surprised if it were a serious issue. Probably just some tests and rules need tweaking. I don't have a big desire to look into gmaven though. build scripts are something you can pay me to work on... but in my free time? I have to pass.... there are still plenty of rules to write without CLASS_GEN. As for the Groovy version... I think we should upgrade as soon as possible. You shouldn't need to upgrade the groovy version you compile with only the version you run codenarc with. But maybe I'm not thinking right. -- Hamlet D'Arcy ham...@gm... On Wed, Oct 27, 2010 at 10:14 PM, <chr...@wa...> wrote: > > Holy crap! You've been busy. Awesome! > > I just upped the version to Groovy 1.6 on the last release. I am a bit > hesitant to go to 1.7 now. That will require many users to upgrade (like > us). That may not be a huge deal; it will certainly have to happen sooner or > later. But yes, I am also not looking forward to fooling around with the > GMaven config. As I'm sure you noticed, where I needed to define "local" > classes, I just put at the end of the same source file. It will be nice to > have support for inner classes when we get there. If you feel that is > important to do now, and you are willing to take a crack at the GMaven > stuff, that is ok with me. > > Have you tested running those *ClassGeneration *rules against another code > base with the application classes not in the classpath? Does it blow up, or > just fail silently? > > Thanks so much. You da man! > Chris > > > *"Hamlet D'Arcy" <ham...@gm...>* > > 10/27/2010 04:02 PM > To > Cod...@li... > cc > Subject > [Codenarc-developer] build is clean again > > > > > the build is clean again and should build fine. > > There are a few commented out tests. > > Some tests fail because they use anonymous inner classes, a 1.7 > feature that the build does not support. How hard is it to fix the > build? I have heard that GMaven has problems here. > > Some tests fail because they can only be run in ClassGeneration. > > That's all, 9 new rules were added. > > -- > Hamlet D'Arcy > ham...@gm... > > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America > contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Codenarc-developer mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-developer > > ForwardSourceID:NT000CD312 > |
From: <chr...@wa...> - 2010-10-27 20:14:48
|
Holy crap! You've been busy. Awesome! I just upped the version to Groovy 1.6 on the last release. I am a bit hesitant to go to 1.7 now. That will require many users to upgrade (like us). That may not be a huge deal; it will certainly have to happen sooner or later. But yes, I am also not looking forward to fooling around with the GMaven config. As I'm sure you noticed, where I needed to define "local" classes, I just put at the end of the same source file. It will be nice to have support for inner classes when we get there. If you feel that is important to do now, and you are willing to take a crack at the GMaven stuff, that is ok with me. Have you tested running those ClassGeneration rules against another code base with the application classes not in the classpath? Does it blow up, or just fail silently? Thanks so much. You da man! Chris "Hamlet D'Arcy" <ham...@gm...> 10/27/2010 04:02 PM To Cod...@li... cc Subject [Codenarc-developer] build is clean again the build is clean again and should build fine. There are a few commented out tests. Some tests fail because they use anonymous inner classes, a 1.7 feature that the build does not support. How hard is it to fix the build? I have heard that GMaven has problems here. Some tests fail because they can only be run in ClassGeneration. That's all, 9 new rules were added. -- Hamlet D'Arcy ham...@gm... ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Codenarc-developer mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-developer ForwardSourceID:NT000CD312 |
From: Hamlet D'A. <ham...@gm...> - 2010-10-27 20:02:14
|
the build is clean again and should build fine. There are a few commented out tests. Some tests fail because they use anonymous inner classes, a 1.7 feature that the build does not support. How hard is it to fix the build? I have heard that GMaven has problems here. Some tests fail because they can only be run in ClassGeneration. That's all, 9 new rules were added. -- Hamlet D'Arcy ham...@gm... |
From: Hamlet D'A. <ham...@gm...> - 2010-10-27 19:42:50
|
Hi Chris, the maven build is failing because the test cases have anonymous inner classes, a feature of 1.7 not groovy 1.6. Can we upgrade to 1.7? -- Hamlet D'Arcy ham...@gm... |
From: Hamlet D'A. <ham...@gm...> - 2010-10-24 09:54:04
|
Hi all (Chris), When I finish and check in a rule, do I mark it "closed" in the tracker? Or is there another process. -- Hamlet D'Arcy ham...@gm... |
From: <chr...@wa...> - 2010-10-21 14:51:55
|
Those are the markup "source" files for the CodeNarc web site, built by Maven. See http://maven.apache.org/doxia/references/apt-format.html Chris "Hamlet D'Arcy" <ham...@gm...> 10/21/2010 07:54 AM To Cod...@li... cc Subject [Codenarc-developer] what are the .apt files? What is the purpose of the .apt files in the source folders? I have never seen them before. -- Hamlet D'Arcy ham...@gm... ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Codenarc-developer mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-developer ForwardSourceID:NT000CCA46 |
From: Hamlet D'A. <ham...@gm...> - 2010-10-21 11:54:26
|
What is the purpose of the .apt files in the source folders? I have never seen them before. -- Hamlet D'Arcy ham...@gm... |
From: <chr...@wa...> - 2010-05-24 11:54:14
|
>> My other idea was to make it a maven target. We're already pretty tied >> to Maven. "mvn create-rule" might be good as well. [Original Response] There are a bunch of non-Maven users (including me at work), so I would not want to introduce that dependency. [Less Stupid Response] OK, we are only talking about CodeNarc developers here, and they likely are already using Maven to build CodeNarc. I think I'd still prefer to keep this out of Maven, but perhaps that is a reasonable option. Chris |
From: <chr...@wa...> - 2010-05-24 11:48:52
|
>> I really want it to parallel grails and griffon as much as possible. >> So "codenarc create-rule" is the preference. However, the script to >> execute is very, very simple. Perhaps we should rename "codenarc" to >> "codenarc.groovy" and then provide a ./bin/codenarc and >> ./bin/codenarc.bat. That sounds like overengineering though. Agreed. I definitely want the syntax to be "codenarc create-rule", as well. I'm hoping to get that syntax for both Windows and Unix. (I think there are actually more Windows users than Unix users, though I can't be sure.) If we rename "codenarc" to "codenarc.groovy", and then add a "codenarc" file that just redirects to "codenarc.groovy" (for unix), would that be to much bloat? >> My other idea was to make it a maven target. We're already pretty tied >> to Maven. "mvn create-rule" might be good as well. There are a bunch of non-Maven users (including me at work), so I would not want to introduce that dependency. Chris |
From: Hamlet D'A. <ham...@gm...> - 2010-05-24 09:29:13
|
Is anyone from the CodeNarc community going to JavaOne or 2GX? I'll be at both. -- Hamlet D'Arcy ham...@gm... |
From: Hamlet D'A. <ham...@gm...> - 2010-05-24 06:33:12
|
> (1) If the script file was named "codenarc.groovy" instead of "codenarc", > that would allow Windows users (who have the .groovy file association setup) > to run it by just executing "codenarc". But I guess that would make it more > verbose for unix users. Is there a good compromise? I really want it to parallel grails and griffon as much as possible. So "codenarc create-rule" is the preference. However, the script to execute is very, very simple. Perhaps we should rename "codenarc" to "codenarc.groovy" and then provide a ./bin/codenarc and ./bin/codenarc.bat. That sounds like overengineering though. My other idea was to make it a maven target. We're already pretty tied to Maven. "mvn create-rule" might be good as well. > (2) Should the "template" folder be under "src"? I'm not really sure what > the right answer is -- it could be argued that they are "source" files. :) speaking of Maven, it is very Maven-y to think of source files having a correct place to be. Put them wherever you want! -- Hamlet D'Arcy ham...@gm... On Mon, May 24, 2010 at 3:52 AM, Chris Mair <chr...@ea...> wrote: > Hamlet, > > That is very cool! A wonderful enhancement. I have pulled it into the SVN > trunk. I added a return() on line 7 to avoid an > ArrayIndexOutOfBoundsException on line 10 (just an annoyance when no > parameters are specified). > > I have a couple questions: > (1) If the script file was named "codenarc.groovy" instead of "codenarc", > that would allow Windows users (who have the .groovy file association setup) > to run it by just executing "codenarc". But I guess that would make it more > verbose for unix users. Is there a good compromise? > > (2) Should the "template" folder be under "src"? I'm not really sure what > the right answer is -- it could be argued that they are "source" files. > > It will be a little challenging to write proper tests for that script, but I > may take a shot at that. > > Thanks very much. > Chris > -----Original Message----- > From: Hamlet D'Arcy [mailto:ham...@gm...] > Sent: Sunday, May 23, 2010 2:19 AM > To: Cod...@li... > Subject: [Codenarc-developer] created a codenarc create-rule target > > > Hi all, > > I just submitted a patch, and I think it will be really useful. > > I want creating rules to be easier and not have to copy and paste > boilerplate. My intent is to be able to create a new rule live on stage at > some upcoming conferences. > > The patch is attached to: > https://sourceforge.net/tracker/?func=detail&atid=1126575&aid=3005873&group_ > id=250145 > > On Unix/Mac, you can run the following from the project: > > ./codenarc create-rule > > You will enter a rule name and be prompted to select a category. > > Then the base rule, rule test, ruleset xml, and properties will all be > created/updated for you. All you have to do is override a method in your > AstTransfromation and update the unit test. > > Windows users can run > groovy codenarc create-rule > > Let me know how it works. > > -- > Hamlet D'Arcy > ham...@gm... > > ---------------------------------------------------------------------------- > -- > > _______________________________________________ > Codenarc-developer mailing list Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-developer > > |
From: Chris M. <chr...@ea...> - 2010-05-24 01:52:28
|
Hamlet, That is very cool! A wonderful enhancement. I have pulled it into the SVN trunk. I added a return() on line 7 to avoid an ArrayIndexOutOfBoundsException on line 10 (just an annoyance when no parameters are specified). I have a couple questions: (1) If the script file was named "codenarc.groovy" instead of "codenarc", that would allow Windows users (who have the .groovy file association setup) to run it by just executing "codenarc". But I guess that would make it more verbose for unix users. Is there a good compromise? (2) Should the "template" folder be under "src"? I'm not really sure what the right answer is -- it could be argued that they are "source" files. It will be a little challenging to write proper tests for that script, but I may take a shot at that. Thanks very much. Chris -----Original Message----- From: Hamlet D'Arcy [mailto:ham...@gm...] Sent: Sunday, May 23, 2010 2:19 AM To: Cod...@li... Subject: [Codenarc-developer] created a codenarc create-rule target Hi all, I just submitted a patch, and I think it will be really useful. I want creating rules to be easier and not have to copy and paste boilerplate. My intent is to be able to create a new rule live on stage at some upcoming conferences. The patch is attached to: https://sourceforge.net/tracker/?func=detail&atid=1126575&aid=3005873&group_ id=250145 On Unix/Mac, you can run the following from the project: ./codenarc create-rule You will enter a rule name and be prompted to select a category. Then the base rule, rule test, ruleset xml, and properties will all be created/updated for you. All you have to do is override a method in your AstTransfromation and update the unit test. Windows users can run groovy codenarc create-rule Let me know how it works. -- Hamlet D'Arcy ham...@gm... ---------------------------------------------------------------------------- -- _______________________________________________ Codenarc-developer mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-developer |
From: Hamlet D'A. <ham...@gm...> - 2010-05-23 06:19:31
|
Hi all, I just submitted a patch, and I think it will be really useful. I want creating rules to be easier and not have to copy and paste boilerplate. My intent is to be able to create a new rule live on stage at some upcoming conferences. The patch is attached to: https://sourceforge.net/tracker/?func=detail&atid=1126575&aid=3005873&group_id=250145 On Unix/Mac, you can run the following from the project: ./codenarc create-rule You will enter a rule name and be prompted to select a category. Then the base rule, rule test, ruleset xml, and properties will all be created/updated for you. All you have to do is override a method in your AstTransfromation and update the unit test. Windows users can run groovy codenarc create-rule Let me know how it works. -- Hamlet D'Arcy ham...@gm... |
From: Chris M. <chr...@ea...> - 2010-05-05 01:57:10
|
These should all be taken care of now. Chris -----Original Message----- From: Hamlet D'Arcy [mailto:ham...@gm...] Sent: Tuesday, May 04, 2010 3:53 PM To: Cod...@li... Subject: [Codenarc-developer] more rules coming - get patches merged Hi Chris, Not to pressure you too much... but can you be sure that all the outstanding patches get merged (or let me know what to fix). We are planning a hacking night at jax.de and I want to get some new people writing rules. This means getting those patches merged so that the more code that is coming doesn't cause issues. I have 4 outstanding patches: http://sourceforge.net/tracker/index.php?func=detail&aid=2994307&group_id=25 0145&atid=1126575 http://sourceforge.net/tracker/index.php?func=detail&aid=2995420&group_id=25 0145&atid=1126575 http://sourceforge.net/tracker/index.php?func=detail&aid=2995478&group_id=25 0145&atid=1126575 http://sourceforge.net/tracker/index.php?func=detail&aid=2996774&group_id=25 0145&atid=1126575 Happy to do this myself, but would need commit access. -- Hamlet D'Arcy ham...@gm... ---------------------------------------------------------------------------- -- _______________________________________________ Codenarc-developer mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-developer |