- SonarQube version 5.6 or higher
- SonarXML (plug-in installed on SonarQube) version 1.4.2 or higher
- In case of Java source code: Maven version 3.0 or higher or Gradle version 5.0 or higher
- Shutdown your SonarQube instance.
- Download the latest version of the plug-in from the versions folder.
- Move the downloaded jar to the extensions/plugins folder of your SonarQube installation.
- Start SonarQube.
- Login with permissions to change or add quality profiles.
- Navigate to the quality profile page
- Click on the arrow next to the quality profile you want to add the rules to.
- Select activate more rules.
- Select the Repository HUSACCT. This will filter away all other inactive rules.
- Do a bulk change and select "activate in ".
- The plug-in will now run with each project that uses this profile.
- Make sure you don't have the SonarQube paramater "sonar.language" set to cs. Otherwise, SonarQube will ignore all XML files.
- Create a file called "HUSACCT.properties.xml".
- Create an element called "workspacePath" with the name of your husacct sac file inside. (example: workspace.xml)
- Run the sonar-scanner.
- Place the HUSACCT workspace into your src/main/java folder
- Make sure you don't have the SonarQube paramater "sonar.language" set to java. Otherwise, SonarQube will ignore all XML files.
- Add a property to pom.xml with the path to the workspace file (relative to src/main/java). If your workspace is located at src/main/java/workspace.xml
<properties>
<sonar.husacct.workspacePath>workspace.xml</sonar.husacct.workspacePath>
</properties>
- Add the SonarQube maven plugin
- Run the following command to start the scan: mvn sonar:sonar
- Place the HUSACCT workspace into your src/main/java folder
- Make sure you don't have the SonarQube paramater "sonar.language" set to java. Otherwise, SonarQube will ignore all XML files.
- Add the SonarQube gradle plugin
- Add a property to the build.gradle SonarQube plugin with the path to the workspace file (relative to src/main/java). If your workspace is located at src/main/java/workspace.xml
sonarqube {
properties {
property 'sonar.husacct.workspacePath', 'workspace.xml'
}
}
- Run the following command to start the scan: gradle sonarqube