Giter VIP home page Giter VIP logo

sonar-custom-metrics's Introduction

sonar-detekt

Join the chat at https://kotlinlang.slack.com/messages/C88E12QH4/convo/C0BQ5GZ0S-1511956674.000289/ Pre Merge Checks FOSSA Status

sonar-kotlin-in-action

Features

  • Integrates detekt for static code analysis
  • Default quality profiles detekt active (80+ rules) and detekt all (164+ rules)
  • Supports SonarQube 7.9.3+
  • Supports detekt's yaml config, baseline.xml and excludes
  • Seamless integration with official SonarKotlin (no redundant features)

Non supported features as of 2.x.x

  • code coverage
  • test reports
  • syntax highlighting
  • metrics

The official SonarKotlin plugin now supports these features.

Usage

Sonar Update Center

  • Administration > Marketplace > Search for detekt

Building from source

  • git clone https://github.com/detekt/sonar-detekt
  • cd sonar-detekt
  • mvn verify
  • cp target/sonar-detekt-<version>.jar $SONAR_HOME/extensions/plugins
  • cd $SONAR_HOME/bin/<OS>
  • ./sonar.sh restart

Configurations, Baselines and Filters

Read about detekt configuration files here and about detekt baseline formats here.

Best ways to get started is to configure the detekt-gradle-plugin in your project and use its detektBaseline and detektGenerateConfig tasks.

  • detektGenerateConfig copies the default configuration file which you can use to turn on and off rules and set appropriate threshold values for some rules.
  • detektBaseline analyzes your project and generates a baseline xml file with all your current findings. This findings won't get reported anymore in sonar.
Settings

To make use of this features, you have to set up some properties:

configs

detekt path filters support multiple regex entries by adding a , for separating. detekt yaml configuration path also supports multiple configuration files where the first entered override some values of the later added config files.

Limitations

Sonar analyzes each module individually which makes it harder to search for your config files. If you use relative paths, sonar-detekt first tries to find the provided path inside this module and if it can't find it, we are searching for the file in the parent folder. This leads to the limitation that only projects with sub-projects of depth 1 are supported. If you need more config files in your project hierarchies, provide them in the sub-projects with the same relative path available.

Mentions

As mentioned/used in ...

License

FOSSA Status

sonar-custom-metrics's People

Contributors

arturbosch avatar schalkms avatar cortinico avatar ozsie avatar vexdev avatar jvilya avatar olivierlemasle avatar grevolution avatar limdale avatar moulinex avatar johnou avatar nuhkoca avatar fossabot avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.