Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 2.03 KB

supported-tools.md

File metadata and controls

57 lines (47 loc) · 2.03 KB

Supported tools

The plugin supports several static analysis tools. The availability of each tool depends on the project the plugin is applied to. Some tools only support Java code, some only Kotlin code, and some only work on Android projects. To be precise:

Tool Java Android
(Java)
Kotlin Android
(Kotlin)
Checkstyle
PMD
SpotBugs
Detekt
Android Lint ✅️ ✅️
KtLint ✅️ ✅️

For additional informations and tips on how to obtain advanced behaviours with the plugin and its tools, please refer to the advanced usage page.

Table of contents


Enable and disable tools

In order to enable a tool, you just need to add it to the staticAnalysis closure. To enable all supported tools with their default configurations:

staticAnalysis {
    penalty {
        // ... (optional)
    }

    checkstyle {}
    pmd {}
    spotbugs {}
    lintOptions {}
    detekt {}
    ktlint {}
}

To disable a tool, simply omit its closure from staticAnalysis. This means that, for example, this will not run any tools:

staticAnalysis {
    penalty {
        // ...
    }
}