Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

The features provided by the Switch Off Violations plugin were added to SonarQube 4.0 and extended. Therefore, this plugin must not be used anymore with SonarQube 4.0+.



Wiki Markup
Your browser does not support iframes.


  • By rule
  • By file name/path
  • By line or range of lines
  • By file content


  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. Restart the SonarQubeTM server

Include Page
Include - Plugin Installation
Include - Plugin Installation


Exclusion patterns can be specified at both global and project levels. Go to Settings > Configuration > General Settings > Switch Off Violations (or at project level: Configuration > Settings > Switch Off Violations) and add exclusion patterns to the following properties:

  • File exclusion patterns (sonar.switchoffviolations.allfile) to switch off all the issues on files that contains contain a block of code that matches a given regular expression.
    • Example: switch off all the issues on files containing @javax\.annotation\.Generated
  • Bloc exclusion patterns (sonar.switchoffviolations.block) to switch off issues on specific blocks of code. Note: if the first regular expression is found but not the second one, then the plugin considers that the end of the code block is the end of the file.