Thank you Guillaume and Leszek for the great feedback. I will make it work, but I still think that this is not a good use of an error return code. Success should not mean no findings. It should mean no errors. This is a convention that is very longstanding and there is no good reason to buck the trend.
Cheers. On Apr 28, 8:11 am, Guillaume Gautreau <[email protected]> wrote: > Hi Vlad, > We are using both Gendarme and Hudson for building some .Net projects. > The fact is that it is working great. > The build is launched with a MSBuild xml file, with this gendarme section > :<Target Name="Gendarme" DependsOnTargets="Build"> > <ExecContinueOnError="true"Command="$(GendarmeExe) --config > CodeAnalysis\GendarmeRules.xml --severity medium+ --confidence normal+ > --ignore CodeAnalysis\GendarmeIgnore.txt -xml > $(ReportsFolder)\xml\gendarme-%(Projects.Name).xml > $(PluginsDir)\%(Projects.Name)\*.dll"/> > <Exec ContinueOnError="true" Command="$(MSXslExe) > $(ReportsFolder)\xml\gendarme-%(Projects.Name).xml $(GendarmeXsl) -o > $(ReportsFolder)\html\gendarme-%(Projects.Name).html" /> > </Target>Note the "ContinueOnError" attribute, that allow us to ignore the > return value of gendarme. > The second line creates an HTML report from the gendarme xml output. > Le 28/04/2011 14:04, Vlad a écrit :Hello Sebastien, I added a build step to > Hudson to run Gendarme on my assemblies and it sort of ran fine. The only > problem was that I broke many rules. According to the FAQ, Gendarme returns a > 1 when it runs correctly but finds broken rules. If it finds all files and > all config files are OK, it should return a 0. Returning a 1 signifies that > Gendarme did not succeed which is not the case (it successfully ran with > findings). Hudson as a result cannot work with Gendarme. Merci, Vladimir On > Apr 16, 10:01 am, Sebastien Pouliot<[email protected]>wrote:Hello, > I know some people have such a setup [1] and that a hudson plugin [2] is > available. However this is not something I use so I cannot be of more help. > Hopefully you'll get an answer from someone here or on hudson mailing-lists. > In the later case I would appreciate if you could post a link back to the > answers. Thanks Sebastien > [1]http://grozeille.com/2010/01/08/hudson-gendarme/(infrench) > [2]http://wiki.hudson-ci.org/display/HUDSON/ViolationsOn Apr 14, 7:58 am, > GSv<[email protected]>wrote:I'm trying to Add Gendarme as part of my > existing Hudson Continuous Integration. Can some one point me to Gendarme > plug-in for Hudson and also steps to configure the Hudson Job with Gendarme > output? -- You received this message because you are subscribed to the Google Groups "Gendarme" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/gendarme?hl=en.

