Re: [Codenarc-developer] running codenarc in text mode from commandline on changeset
Brought to you by:
chrismair
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 |