Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Latest commit

 

History

History
65 lines (54 loc) · 2.66 KB

supported-tools.md

File metadata and controls

65 lines (54 loc) · 2.66 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
FindBugs
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 {}
    findbugs {}
    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 {
        // ...
    }
}

Example configurations

If you want, you can use the Novoda team-props scaffolding system as a starting point for setting up your project. The repository contains a good example of configuration for the plugin, and rulesets for all supported tools.