Importing quality profile from one sonar instance to another

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Importing quality profile from one sonar instance to another

inkaur
I have two sonar instances-Sonar Version 3.1.1 and Sonarqube Version 4.2. I am trying to import a quality profile from sonar instance 3.1.1 in sonarqube 4.2.While importing,i get following error-

Rule not found: [repository=checkstyle, key=com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheck]
Rule not found: [repository=squid, key=AvoidBreakOutsideSwitch]
Rule not found: [repository=squid, key=AvoidContinueStatement]

Any help is appreciated.Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Importing quality profile from one sonar instance to another

Patroklos Papapetrou
Hi 
The Sonarqube versions you're using (3.1.1 and 4.2 ) have a lot of differences regarding quality profiles and coding rules so it's very probable that for the rules for which you're getting these errors do not exist any more in 4.2 quality profiles.


Patroklos Papapetrou

Linkedin | Twitter | Author Speaker | Blog | Google+ | GitHub |




On Tue, Jun 24, 2014 at 10:10 AM, inkaur <[hidden email]> wrote:
I have two sonar instances-Sonar Version 3.1.1 and Sonarqube Version 4.2. I
am trying to import a quality profile from sonar instance 3.1.1 in sonarqube
4.2.While importing,i get following error-

Rule not found: [repository=checkstyle,
key=com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheck]
Rule not found: [repository=squid, key=AvoidBreakOutsideSwitch]
Rule not found: [repository=squid, key=AvoidContinueStatement]

Any help is appreciated.Thanks in advance.



--
View this message in context: http://sonarqube.15.x6.nabble.com/Importing-quality-profile-from-one-sonar-instance-to-another-tp5025990.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Importing quality profile from one sonar instance to another

inkaur
Hi Patroklos,

Thanks for the reply.
Is there any option available through which we can add these rules in Sonarqube 4.2 or any alternative available for these rules?
Reply | Threaded
Open this post in threaded view
|

Re: Importing quality profile from one sonar instance to another

Julien Lancelot
Hi,

As reported by Patroklos, a lot of rules have been updated / added / removed since SonarQube 3.1.1 and 4.2, so the warnings displayed when importing the 3.1.1's profile are normal.
Removed rules cannot be added back. I do not know all rules, but here are some ideas to replace yours (from Java plugin 2.2.1) : 
  • checkstyle: DoubleCheckedLockingCheck  -> findbugs:DC_DOUBLECHECK : Multithreaded correctness - Possible double check of field
  • squid:AvoidBreakOutsideSwitch -> squid:S128 : Switch cases should end with an unconditional break statement
  • squid:AvoidContinueStatement -> squid:S135 : Loops should not contain more than a single "break" or "continue" statement 
Regads,



Julien LANCELOT | SonarSource


On 24 June 2014 11:15, inkaur <[hidden email]> wrote:
Hi Patroklos,

Thanks for the reply.
Is there any option available through which we can add these rules in
Sonarqube 4.2 or any alternative available for these rules?




--
View this message in context: http://sonarqube.15.x6.nabble.com/Importing-quality-profile-from-one-sonar-instance-to-another-tp5025990p5026001.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Importing quality profile from one sonar instance to another

inkaur
Hi Julien,
Thanks for the reply.
I tried to replace the rules with the rules mentioned by you.The rule "findbugs:DC_DOUBLECHECK" was added successfully but for other two rules, i again got rule not found error.