简体   繁体   中英

How to Add CodeNarc Rules to Sonar Groovy Plugin

CodeNarc has 346 rules, but the Sonar Groovy plugin (which utilizes CodeNarc) only uses 59 of those rules.

I need to add more rules in Sonar to the Groovy analysis. How can I do this?

Thanks

I think you are talking about the default quality profile of the Sonar Groovy Plugin which indeed activate only 59 rules by default (as you can see on nemo (public instance of SonarQube analyzing open source projects))

The other rules of CodeNarc would be available in the rules section. You can see them by filtering by language and rule repository : http://nemo.sonarqube.org/coding_rules#languages=grvy|repositories=grvy

To use them you need to activate those rules in a quality profile and set it for your project : see the documentation of quality profile for this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM