SonarQube

Features

SonarQube

SonarQube Scanner

npm i -g sonar-scanner

Generate User Token

JavaScript/TypeScript

# must be unique in a given SonarQube instance
sonar.projectKey=my:project
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=My project
sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# Since SonarQube 4.2, this property is optional if sonar.modules is set.
# If not set, SonarQube starts looking for source code from the directory containing
# the sonar-project.properties file.
sonar.sources=.
sonar.login=${SONAR_TOKEN}

# Encoding of the source code. Default is default system encoding
# sonar.sourceEncoding=UTF-8
# jest --coverage report
# sonar.javascript.lcov.reportPaths=./coverage/lcov.info

Java

sonar.projectKey=swlabs:helper
sonar.projectName=helper
sonar.projectVersion=1.0
sonar.language=java
sonar.sources=src/main/java/
sonar.java.binaries=target/classes
sonar.sourceEncoding=UTF-8
sonar.login=${SONAR_TOKEN}

Python

sonar.projectKey=swlabs:django
sonar.projectName=django
sonar.sources=.
sonar.language=py
sonar.login=${SONAR_TOKEN}

CPP

# must be unique in a given instance
sonar.projectKey=cubrid:cubrid

# defaults to project key
#sonar.projectName=My project
# defaults to 'not provided'
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Defaults to .
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

# mandatory: files to be handled by the _cxx plugin_
sonar.cxx.file.suffixes=.h,.hpp,.c,.cpp
sonar.login=${SONAR_TOKEN}
sonar.exclusions=src/jsp/**,contrib/**

android sonar

apply plugin: "sonar-runner"
sonarRunner {
    sonarProperties {
        property "sonar.host.url", "http://localhost:9000/"
//        property "sonar.jdbc.url", "jdbc:mysql://DB의 url 및 ip:3306/sonar?useUnicode=true&characterEncoding=utf8"
//        property "sonar.jdbc.username", "sonar"
//        property "sonar.jdbc.password", "sonar"
//        property "sonar.login", "admin"
//        property "sonar.password", "admin"
        property "sonar.projectKey", "Sonar:Test"
        property "sonar.projectName", "프로젝트명"
        property "sonar.projectVersion", "1.0"
        property "sonar.sourceEncoding", "UTF-8"
        property "sonar.language", "java"
        property "sonar.sources", "src/main/java"
        property "sonar.profile", "Sonar way"
    }
}

ref

What Else?
inflearn react api server -50% 할인쿠폰: 15108-f2af1e086101 buy me a coffee