[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: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... |