Skip to content
Michel Pawlak edited this page Jan 20, 2017 · 2 revisions

In order to use this plugin on your SonarQube server instance, you need first to install it.

Installing an official Code Smells plugin release

Installation of official releases of the plugin couldn't be simpler: the plugin is available in SonarQube's update center under the name "Code Smells". Just search for the plugin, install it, restart yourSonarQube instance and that's it!

Installing RC or SNAPSHOT version

Release Candidate (RC) versions can be directly downloaded from the project's GitHub releases page. If you want to install a RC version or a SNAPSHOT version built from source, you have to follow these steps:

  1. Download the RC version of the plugin / or build a SNAPSHOT version of the plugin
  2. Stop your SonarQube instance
  3. Remove any previously installed version of SVG Badges from <sonarqube_root_directory>/extensions/plugins
  4. Copy the new version of the plugin to <sonarqube_root_directory>/extensions/plugins
  5. Start your SonarQube instance

Adding Code Smells rules to your active profile

In order to have the plugin detect the various Smells types, and have Smell annotations appear as violations which contribute to the project's technical debt, you need to add to your profile all rules part of the Smells rules repository.

Note 1: While I recommend activating all rules part of the Smell repository, you don't have to do it. If the rules are not activated, the plugin will still report Smell related technical debt in its own widget, but Smell annotations will not be counted as issues, and as such they will not contribute to the project's technical debt, nor impact the SQALE rating. Do this if you don't want to mix automated debt discovery with "subjective" debt declaration.

Note 2: If you decide to activate Smell rules in your profile, make sure to activate all of them, otherwise, only those that have been activated will appear as issues.

Installing the Code Smells widget

When using SonarQube < 6.0, you can add the Code Smells widget to your project or view dashboard.