Quality profile for multiple languages

Hi,

I am currently using SonarQube 6.1. I have a project which has both Java and Python code. Is there a way we can run analysis for both using same quality profile?
Suppose,we run analysis for Java code, data gets pushed to the dashboard. Post this if we run analysis for python code, it overwrites Java data as it has the same project key. How do we address this issue?

Regards,
Vinay

Hi Vinay,

You address this by removing the long-deprecated (and removed in 7.7) sonar.language property and running one analysis for everything. And BTW, it’s not possible to have rules for two languages in the same profile, but you really don’t need to do that.

 
HTH,
Ann

Hi Ann,

Thanks for the info. Do you mean we will still need to have some quality profile for analysis? If we dont specify any language for analysis, does sonar have the intelligence to look at the existing profile for that language and pick the right profile.

Regards,
Vinay

Hi Vinay,

It does indeed. :slight_smile:

For each language detected during an analysis, SonarQube will choose the correct profile:

  • the profile for that language that the project is explicitly assigned to
  • the default profile for that language

 
Ann