codeclimate/codeclimate-ss-analyzer-wrapper

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Code Climate Wrapper for SonarSource Analyzers

CircleCI Maintainability Test Coverage

codeclimate-ss-analyzer-wrapper is the base library for SonarSource based engines. It wraps Sonarlint in standalone mode.

Tests
 test
Usage

You can use the codeclimate-sonar-php repo as an example for building a new sonar based engine. The important aspects are listed below:

  1. Use this wrapper lib. Make sure your 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`:

!/usr/bin/env sh

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)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.