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