Project administration is accessible through the "Configuration" menu.
Only project administrators can access project settings (See Security).
Adding a Project
Adding a project to SonarQubeis SonarQube is not done through the web interface, but automatically when the project is analyzed for the first time.
Setting Quality Profiles
As version 3.3 enables multi-language project analysis, project Project administrators can select which quality profile to use for each language on their project. Go to Settings > Quality Configuration > Quality Profiles:
It is possible to exclude files from being analyzed:
- Since version 3.3, go to Configuration > Settings > Exclusions and set the
- For versions prior to 3.3, click on Exclusions in the left menu and set the
- Exclude tests file from being analyzed: go to Configuration > Settings > Exclusions and set the
- Set global exclusions that will apply to all the projects: go to Configuration > General Settings > Exclusions and set the
If you want to exclude source code from being check against some coding rules, you can have a look at the Switch Off Violations plugin.
Since version 3.5, it is also possible to:
- Set the files to be analyzed through the
sonar.test.inclusionsproperties. In this case, only these very files will be analyzed.
- Exclude some files from being checked against duplications. To do so, set the through the
sonar.cpd.exclusionsproperty (Configuration > Settings > Duplications).
Fully qualified name of the resource (see red frames below):
For Java only, replace '.' package separator by '/' and add '.java' extension.
# Exclude all classes ending by 'Bean' # Matches org.sonar.api.MyBean.java, org.sonar.util.MyOtherBean.java, etc. sonar.exclusions=**/*Bean.java # Exclude all classes in the 'org.sonar' package # Matches org.sonar.MyClass.java, org.sonar.MyOtherClass.java # But does not match org.sonar.util.MyClassUtil.java sonar.exclusions=org/sonar/*.java # Exclude all classes in the 'org.sonar' package and its children # Matches org.sonar.MyClass.java, org.sonar.MyOtherClass.java, org.sonar.util.MyClassUtil.java sonar.exclusions=org/sonar/**/*.java
# Exclude all the *.cs files included in /path_to_my_project/myProject/src/generated and its subdirectories sonar.exclusions=file:/path_to_my_project/myProject/src/generated/**/*.cs # Exclude all the java classes contained in a src/generated/java directory and its subdirectories sonar.exclusions=file:**/src/generated/java/**/*.java
See Narrowing the Focus.
To add links to your project, click on Links in the left menu:
Any link can be added trough through the web interface.
Those links can be displayed on a dashboard by adding the Description widget.
Several plugins can be configured at project level to override Global Settings for that project. On your project, click on Configuration in the top right cornerthe plugin's global settings.