Giter VIP home page Giter VIP logo

detekt's Introduction

detekt

Join the chat at https://kotlinlang.slack.com/messages/C88E12QH4/convo/C0BQ5GZ0S-1511956674.000289/ Visit the website at https://arturbosch.github.io/detekt/ Download gradle plugin

build status build status windows codecov CodeFactor Awesome Kotlin Badge

Meet detekt, a static code analysis tool for the Kotlin programming language. It operates on the abstract syntax tree provided by the Kotlin compiler.

detekt in action

Features

  • Code smell analysis for your Kotlin projects
  • Complexity report based on logical lines of code, McCabe complexity and amount of code smells
  • Highly configurable
  • Suppress findings with Kotlin's @Suppress and Java's @SuppressWarnings annotations
  • Specify code smell thresholds to break your build
  • Code Smell baseline and ignore lists for legacy projects
  • Gradle plugin for code analysis via Gradle builds
  • Gradle tasks to use local IntelliJ distribution for formatting and inspecting Kotlin code
  • SonarQube integration
  • Extensible by own rule sets, FileProcessListener's and OutputReport's
  • IntelliJ integration
  • Unofficial Maven plugin by Ozsie

Project Website

Visit https://arturbosch.github.io/detekt/ for installation guides, release notes, migration guides, rule descriptions and configuration options.

Quick-Links

Quick Start ...

with command-line interface

  • git clone https://github.com/arturbosch/detekt
  • cd detekt
  • ./gradlew build shadowJar
  • java -jar detekt-cli/build/libs/detekt-cli-[version]-all.jar --help

with gradle

Gradle 4.9+ is required:

buildscript {
    repositories {
        jcenter()
    }
}

plugins {
    id("io.gitlab.arturbosch.detekt").version("[version]")
}

detekt {
    toolVersion = "[version]"
    input = files("src/main/kotlin")
    filters = ".*/resources/.*,.*/build/.*"
    baseline = file("my-detekt-baseline.xml") // Just if you want to create a baseline file.
}

See bintray for releases and artifactory for snapshots.

Adding more rule sets

detekt itself provides a wrapper over KtLint as a formatting rule set which can be easily added to the gradle configuration:

dependencies {
    detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:[version]"
}

Likewise custom extensions can be added to detekt.

Contributors

If you contributed to detekt but your name is not in the list, please feel free to add yourself to it!

Mentions

androidweekly androidweekly

As mentioned in...

Integrations:

Credits

detekt's People

Contributors

3flex avatar arturbosch avatar cortinico avatar deeprim avatar egor-n avatar epeee avatar geralt-encore avatar jkaan avatar koral-- avatar lummax avatar marianosimone avatar marschwar avatar mauin avatar mishkun avatar mkobit avatar mydogtom avatar olivierlemasle avatar patrickpilch avatar pavlospt avatar radimvaculik avatar remal avatar rock3r avatar schalkms avatar scottkennedy avatar seanf avatar snowe2010 avatar sschuberth avatar tagantroy avatar tylerbwong avatar vanniktech avatar

Watchers

 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.