Open rogerxu opened 7 years ago
Analyzing with SonarQube Scanner - Scanners - Doc SonarQube
sonar-project.properties
# Must be unique in a given SonarQube instance
sonar.projectKey=com.example.demo:sample-app
# This is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=Sample App
sonar.projectVersion=1.0.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=webapp
sonar.tests=webapp/test
sonar.exclusions=webapp/test/**/*,webapp/localService/**/*,webapp/WEB-INF/**/*
# sonar.test.exclusions=
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
# ESLint
sonar.eslint.reportPaths=report.json
# sonar.javascript.eslint.reportPath=target/eslint/eslint.xml
# sonar.javascript.eslint.overrideSeverity=false
# QUnit
sonar.javascript.qunit.reportPath=target/surefire-reports
# Coverage Results
sonar.javascript.lcov.reportPaths=target/coverage/lcov/lcov.info
Run Scanner
$ sonar-scanner -Dsonar.host.url=http://localhost:9000/sonar -Dsonar.login=<user_token>
Advanced SonarQube Scanner Usages - Scanners - Doc SonarQube
SonarJS - Plugins - Doc SonarQube
Importing ESLint Issues Reports - Plugins - Doc SonarQube
sonar.eslint.reportPaths=report.json
JavaScript Coverage Results Import - Plugins - Doc SonarQube
sonar.javascript.lcov.reportPaths=../target/coverage/lcov
Documentation