Name: codeclimate-ss-analyzer-wrapper
Owner: Code Climate
Description: null
Created: 2017-10-31 12:45:43.0
Updated: 2018-04-02 15:51:15.0
Pushed: 2018-04-02 15:51:14.0
Homepage: null
Size: 440
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
codeclimate-ss-analyzer-wrapper
is the base library for SonarSource based engines.
It wraps Sonarlint in standalone mode.
test
You can use the codeclimate-sonar-php repo as an example for building a new sonar based engine. The important aspects are listed below:
build.gradle
has the following entries:sitories {
ter()
n { url 'https://jitpack.io' }
dependencies { compile(“com.github.codeclimate:sonar-wrapper:master-SNAPSHOT”) }
Add the plugin lib and make sure it is copied to the `build/plugins` directory as part of the `build` task:
task copyPlugins(type: Copy) { into “${buildDir}/plugins” from configurations.testCompile include “sonar--plugin.jar” }
build.dependsOn(copyPlugins)
dependencies { // … compile(“org.sonarsource.php:sonar-php-plugin:2.10.0.2087”) }
unning: The wrapper overrides a few classes from the sonar libraries which makes classpath order something very important to pay attention:
/codeclimate-sonar`:
BUILD_DIR=$(dirname $0) APP=$(find ${BUILD_DIR}/libs -name “codeclimate-sonar-php.jar” | head -n1) WRAPPER=$(find ${BUILD_DIR}/libs -name “sonar-wrapper.jar” | head -n1) CORE=$(find ${BUILD_DIR}/libs -name “sonarlint-core.jar” -or -name “sonarlint-client-api.jar” | tr “\n” “:“) LIBS=$(find ${BUILD_DIR}/libs -name “.jar” | tr “\n” “:“)
CODE_DIR=$1; shift CONFIG_FILE=$1; shift
java \ -noverify \ -cp ${APP}:${WRAPPER}:${CORE}:${LIBS} \ -Djava.awt.headless=true \ -Dsonarlint.home=“${BUILD_DIR}” \ -Dproject.home=“${CODE_DIR}” \ -Dconfig=“${CONFIG_FILE}” \ -Dorg.freemarker.loggerLibrary=none \ cc.App $@
/codeclimate-sonar /code /config.json`
onar Documentation
://www.sonarlint.org/commandline
://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner
e Tracker: http://jira.sonarsource.com/browse/SLCLI
opyright
repository is maintained by CodeClimate. It uses [SonarLint](http://www.sonarlint.org/commandline), which is a SonarSource product. This is not endorsed by SonarSource.
[LICENSE](LICENSE)