Is there a way to have several profiles for one project in Sonar ?
For example we have a Java EE project with : EJB and WebApp (JSP and Back Bean). We have 3 quality profiles: Java, Web and XML. To "execute" these 3 profiles on our project we run three sonar analysis and create 3 result projects in Sonar.
We use views to regroupe these three projects, is there a way to have one project that use 3 profiles and not use views?
We want to use views to group different projects and not on the same project.
You can't have multiple profiles for the same project. But if you want this, you just have to create your own custom profile which has all the rules defined in your profiles. For Example, let's say you have quality profile "Android Lint" and "Sonar Way", and if you wan't to check your project against both these profiles, just do the following:
You now have your own custom quality profile with all the rules that you want.
UPDATE: In the latest version of SonarQube (I am using 6.2), you can use the concept of "Inheritance" to combine multiple quality profiles. You can now set a parent quality profile for any profile. Using this you can chain multiple quality profiles.
Just expanding on @guitarium 's answer above:
For SonarQube 7, you can simply do the following on the SonarQube web portal to add extra rules from other profiles into a custom profile (same as merging, really):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With