Full documentation for SonarQube has moved to a new location: http://docs.sonarqube.org/display/SONAR

Versions Compared

Key

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

...

Extending Coding Rules using XPath

New coding rules can be added using XPath. See the related documentation.

To navigate the AST, download the SSLR CSharp Toolkit.

Note
titleMigrating XPath rules from version 2.0 to 2.1+

Since version 2.1, grammar rule names are in uppercase, and each word in seperated by an underscore, such as: "COMPILATION_UNIT"
In version 2.0, camel cases was used, such as: "compilationUnit"
To convert XPath expressions written for version 2.0 to ones valid in 2.1, simply add underscores between words and uppercase.

New coding rules can be added using XPath. See the related documentation.

To navigate the AST, download the SSLR CSharp Toolkit.

Reusing Custom Rules from External Tools

...