简体   繁体   中英

Two Different Projects on SonarQube using same plugin, but applying different rules from Plugin

So suppose on a single SonarQube instance, two different projects want to be onboarded and scanned. They are to be scanned using the same plugin, but we want to apply different custom rules (and perhaps even use different rules from the plugin for each project), is there a way to do this without having one project interfere with the other?

I'm fairly new to SonarQube, but my understanding is that you cannot have two different plugins target a different file extension, is there anyway to utilize the same plugin just with using different base plugin rules and custom rules as well?

You can create custom quality profiles with the set of rules you want to apply for each project.

Quality Profiles -> Create -> Enter a name and select the language -> Create

If you select a parent the profile will inherit all the rules from it but you can select 'None' for the parent and after the profile is created you will be redirected to the profile settings page. Press 'Activate More' and 'Activate' the desired rules.

Once you are done with the configuration of you custom Quality profiles access you project -> Project Settings -> Quality Profiles and select the custom Quality Profiles you configured before

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