After upgrading Sonar 2.10 to Sonar 3.2, some violation messages are displayed in another language than Sonar default locale.
In my case, Sonar default locale is set to "en" in the general configuration settings. I've also checked in Sonar System Info panel that the Java system property "user.language" is set to "en" as well. I don't have installed Sonar French Pack neither. Only the English pack is installed by default. However some messages are still displayed in French ?!?!
Please note that Sonar metrics is triggered by jobs configured in Jenkins. Should I force anything in Jenkins as well ?
You have to make sure that the default locale on your Jenkins server is also English.
Related
I develop custom SQ plugins for several SQ versions. I am facing a issue since SQ 7.2.1.
On SQ startup, le web.log file tells
-normal Register rules
-start [o.s.s.q.BuiltInQProfileRepositoryImpl] Load quality profiles
-stops with the following error : [o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
-java.lang.IllegalStateException: The following languages have no built-in quality profiles: csh
Note csh is my language name
The SQ startup is fine for version 7.1 and previous with my plugin
How to configure the custom plugin to solve this issue ?
Thanks for your help
You have to implement the BuiltInQualityProfilesDefinition extension point to list rules that should be enabled by default for your language.
Prior to SonarQube 7.2 it was not mandatory to declare a built in quality profile for each language, but it was causing some bugs. See https://jira.sonarsource.com/browse/SONAR-10283
I have installed SonarLint eclipse plugin. I would like to see only those issues which are compatible with Java 1.7. Is there an way to set a particular version for running sonar scan? I checked the options and couldn't find anything.
Just to clarify, I don't want to know how to set java version for Sonar itself. I would like to set java versions for individual scans.
Depending on your environment, this may not be politically feasible, but I'll answer ignoring politics:
First, you need to set up a rule profile on your SonarQube server that's limited to just the rules you want to see - the Java 7 rules and assign it to your project so only those rules are used in analysis.
Now connect your project in Eclipse to the project on your SonarQube server.
Voila! Only those Java 7 rules are applied in Eclipse.
We're analyzing our code with SonarQube 6.1 and started to encounter this issue since version 6.
The code is a Maven 3 project, built with Jenkins, using the SonarQube Maven Scanner.
We have a quality profile Q that inherits from the default profile P.
The code is being analyzed daily.
On every Friday, the quality profile of the project is somehow reset to the default profile P. On Saturday, it is properly set to Q again.
The change of quality profiles can be seen in the project history. Also, the changed quality profile is noted in the log of Jenkins.
What I analyzed:
Logs: There is no POST request to the sonar "qualityprofiles" API noted in the access log.
There are no cronjobs running to my knowledge.
There are no Jobs on Jenkins setting the 'sonar.profile' variable
The analyzed profile also does not set 'sonar.profile'
The scanner context of the runs only differ in the setting 'sonar.cpd.cross_project': Enabled in the 'wrong' run - disabled in the 'proper' run
I'm new to sonar and installed this Build-stability plugin. But when i run it locally i get this error.
Caused by: org.sonar.api.utils.SonarException: Access to the secured
property 'sonar.build-stability.username.secured' is not possible in
preview mode. The SonarQube plugin which requires this property must
be deactivated in preview mode.
How to disable a plugin in different modes? Any other help would be appreciated.
Go to the Settings > General page and the add the "buildstability" plugin part of the default list of plugins to be excluded for Preview and Incremental modes. Ticket created to make this behavior the default one : https://jira.codehaus.org/browse/SONAR-4980.
We have upgarded sonar server 3.5.1. In order to use sonar I have upgraded my local eclipse to Juno(4.2) and sonar plugin to 3.1. Sonar server is able to exclude some packages usign sonar.excustions key and does not show violations for those packages. But when I run report for sonar local analysis I see even though I added sonar.exclusions from local properties it does show violations for exluded files. How i can resolve this issue.
Thanks in advance.
Sapana.
There's currently a limitation on Sonar side (see http://jira.codehaus.org/browse/SONAR-4265) that prevents modules to retrieve all their related settings when analyzed independently from their root project.
Feel free to watch and vote for the ticket.