Skip to content

Troubleshooting Configuration

Günter Wirth edited this page Jan 10, 2021 · 8 revisions

When setting up the plugin and build chain, in the beginning the most common problems are file path issues. Using different tools and build chains, differences in operating systems and SonarQube versions do not make things easier. On this page you will find some hints to get your system up and running.

In the SonarQube documentation you will find general information about Analysis Parameters. In addition, the following instructions must be observed.

General configuration file hints

  • The location of your configuration file sonar-project.properties defines the project base directory . All other files and folders should be on root level or in a subfolder.

    Hint: Only exception is sonar.cxx.includeDirectories where you can define additional include directories outside of root.

  • Use always slashes (/) in the configuration file sonar-project.properties as path separator.

    Hint: It is also possible to use backslashes but you have to escape it with another backslash (\ => \\) which is hard to read.

  • Relative paths defined in configuration file are always relative to the project base directory.

Sample:

root (folder with sonar-project.properties)
|-- src (folder with source files)
|-- tests
|     |-- unittests (folder with unit test results)
|-- build (folder with reports)

resulting sonar-project.properties:

sonar.sources=src
sonar.tests=tests/unittests
sonar.cxx.cppcheck.reportPath=build/cppcheck.xml
Clone this wiki locally