Gerndarme command line parameters via Sonar

154 views
Skip to first unread message

bto...@me.com

unread,
Mar 12, 2014, 10:57:48 AM3/12/14
to gend...@googlegroups.com
Hello.  First post in this group. looks like it hasn't been used in a while, but i'm hoping to get some help!

Tried many many different ways to do this, but it doesn't appear to work.

I am trying to add a command line parameter to the Gendarme exectution that runs during my Sonar run.

i am triggering Sonar from Team City, and i have a few command line parameters for that process (like -Dsonar.assemblies, etc)

I am trying to find a way to pass a parameter to the Gendarme process.   I want to add the 'ignore' parameter

tried stuff like:  -Dsonar.gendarme.ignore=xxx  and many variations of that.  

Any advice?
Thanks
Brett

Alexandre Victoor

unread,
Mar 12, 2014, 5:04:25 PM3/12/14
to gend...@googlegroups.com
Hello Brett
I guess the best place to ask this question would rather be sonar user mailing list.
There is no 'sonar.gendarme.ignore' option, however you can:
- run gendarme on your own, before sonar analysis, and use the xml generated report with sonar using the reuse report option
- use sonar plugin "switch off". This plugins allows to remove violations at the end of the analysis. It works fine unless you want to use gendarme ignore option in order to avoid rules failures.
Hope it helps

Alex


--
You received this message because you are subscribed to the Google Groups "Gendarme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gendarme+u...@googlegroups.com.
To post to this group, send email to gend...@googlegroups.com.
Visit this group at http://groups.google.com/group/gendarme.
For more options, visit https://groups.google.com/d/optout.

bto...@me.com

unread,
Mar 14, 2014, 1:34:52 PM3/14/14
to gend...@googlegroups.com
Thanks for your help and fast response!
That method worked (running Gendarme first, and passing the results to Sonar) but we ended up using a different, and perhaps just as good solution.

I was granted admin rights to our SQ server, and created a custom rules set for this project, so that the offending rule is ignored.  Only problem is that: using Gendarme on it's own, I was able to ignore just the one method that was throwing the exception.  Now, that rule is ignored for all classes.  No big deal (apparently) so I'm happy.

Cheers
Reply all
Reply to author
Forward
0 new messages