Home > Back-end >  Maven Sonarqube
Maven Sonarqube

Time:12-05

Environment: maven 3.6.1 track, sonarQube8.4.1

1. Missing blame information for the following files

We can run from the command or directly in the eclipse sonar report, to help improve the quality of the code and check the coverage, etc.,

We gain sonar in the report, in the log and sonarQube page warning there will be a "Missing blame information for the following files" warning information, this is because we have a switch to or additional source is not stored in the source code management, and the sonar - SCM - git - the plugin,
If we want to remove this warning, actually very simple, his investigation left many detours ), we only need to commit to a switch to the local code,

If a switch to the code does not need to be stored in the source code management, we only need to open the sonarQube, then find the SCM in the configuration, and then put the "Disable the SCM Sensor" effective change can (not recommended, usually we code is through git management, don't need to do the processing),


2. The Bytecode of dependencies was not provided for the analysis of the source files, you took the end up with less precise results. The Bytecode can be provided using sonar. The Java libraries property.

If we see this warning, we will need to configure sonar. The Java libraries, the configuration of different environment in a different way, I am in maven setting. The XML configuration sonar,
You need to specify the general configuration:
Sonar, JDBC url,
Sonar. JDBC. Username.
Sonar. JDBC. Password.
Sonar. Host. Url,
Sonar. Java. Binaries,
Solve this problem, I said the additional configuration above sonar. Java libraries and configuration in the label Commons - lang3-3.9 jars,

3. Sonar. Jacoco. ReportPaths with sonar. Coverage. Jacoco. XmlReportPaths

SonarQube the latest version, already does not support the analysis of XML report, so we, after the upgrade sonarQube. Remember to delete the configuration before sonar jacoco. ReportPaths, with sonar. Coverage. Jacoco. XmlReportPaths to specify,

General sonar. Coverage. Jacoco. XmlReportPaths have the default path is * */target/site/jacoco jacoco. XML, if do not need to specify a new path, we can not set this value, use the default, if we need to specify a new path, by sonar. Coverage. The jacoco. XmlReportPaths reset path,
  • Related