All Projects → novoda → Gradle Static Analysis Plugin

novoda / Gradle Static Analysis Plugin

Licence: apache-2.0
Easy setup of static analysis tools for Android and Java projects.

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Gradle Static Analysis Plugin

Gradle Code Quality Tools Plugin
Gradle plugin that generates ErrorProne, Findbugs, Checkstyle, PMD, CPD, Lint, Detekt & Ktlint Tasks for every subproject.
Stars: ✭ 282 (-29.15%)
Mutual labels:  gradle, gradle-plugin, code-quality, checkstyle, findbugs, pmd
static-code-analysis-plugin
A plugin to simplify Static Code Analysis on Gradle. Not restricted to, but specially useful, in Android projects, by making sure all analysis can access the SDK classes.
Stars: ✭ 36 (-90.95%)
Mutual labels:  gradle, findbugs, pmd, checkstyle, code-quality
Gradle Quality Plugin
Gradle quality plugin for Java and Groovy
Stars: ✭ 97 (-75.63%)
Mutual labels:  gradle, gradle-plugin, checkstyle, findbugs, pmd
Quality Checks
Gradle plugin which includes Checkstyle, FindBugs, and PMD basic configuration.
Stars: ✭ 38 (-90.45%)
Mutual labels:  gradle, checkstyle, findbugs, pmd
Codeanalysis
Android静态代码分析
Stars: ✭ 31 (-92.21%)
Mutual labels:  gradle-plugin, checkstyle, findbugs, pmd
Gradle Android Command Plugin
Handy commands for testing Android on CI
Stars: ✭ 349 (-12.31%)
Mutual labels:  gradle, gradle-plugin, novoda, open-source
Gnag
A Gradle plugin that helps facilitate GitHub PR checking and automatic commenting of violations.
Stars: ✭ 120 (-69.85%)
Mutual labels:  gradle, checkstyle, findbugs, pmd
Gradle Build Properties Plugin
Keep your secrets secret. External build properties support for your Gradle scripts.
Stars: ✭ 110 (-72.36%)
Mutual labels:  gradle, gradle-plugin, novoda, open-source
java-quality-checks
No description or website provided.
Stars: ✭ 33 (-91.71%)
Mutual labels:  findbugs, pmd, checkstyle, code-quality
Android Starter
[Android Architecture] Android starter based on MVP/Dagger2/RxJava2/Robolectric/Espresso/Mockito. It provides a generator to fast create a Android template project.
Stars: ✭ 522 (+31.16%)
Mutual labels:  checkstyle, findbugs, pmd
Kotlin Android Starter
[Kotlin Android] Kotlin Android starter based MVP/Dagger2/RxJava2/Robolectric/Espresso/Mockito. It provides a generator to fast create a Kotlin Android project.
Stars: ✭ 589 (+47.99%)
Mutual labels:  checkstyle, findbugs, pmd
Warnings Ng Plugin
Jenkins Warnings Plugin - Next Generation
Stars: ✭ 248 (-37.69%)
Mutual labels:  checkstyle, findbugs, pmd
Okcheck
Incremental scan,integrate Lint、KtLint、UnitTest、Checkstyle、Findbugs、Pmd, powerful and easy to use
Stars: ✭ 285 (-28.39%)
Mutual labels:  checkstyle, findbugs, pmd
Gradle Pitest Plugin
Gradle plugin for PIT Mutation Testing
Stars: ✭ 144 (-63.82%)
Mutual labels:  gradle, gradle-plugin, code-quality
Debt-Manager
A personal app to store people that owe you money or you owe money to. "Mo Money Mo Problems" 🎵 - The Notorious B.I.G. 😎
Stars: ✭ 22 (-94.47%)
Mutual labels:  findbugs, pmd, checkstyle
change-tracker-plugin
A Gradle plugin to help analyse the dependency between modules and run tasks only on modules impacted by specific set of changes.
Stars: ✭ 103 (-74.12%)
Mutual labels:  gradle, gradle-plugin
gradle-console-reporter
Gradle plugin to report various kinds of summaries to console.
Stars: ✭ 49 (-87.69%)
Mutual labels:  gradle, gradle-plugin
schema-registry-plugin
Gradle plugin to interact with Confluent Schema-Registry.
Stars: ✭ 60 (-84.92%)
Mutual labels:  gradle, gradle-plugin
Gradle Unused Resources Remover Plugin
Gradle Plugin that removes unused resources in Android projects.
Stars: ✭ 282 (-29.15%)
Mutual labels:  gradle, gradle-plugin
jooq-plugin
Plugin for generating jOOQ classes using dockerized databases
Stars: ✭ 55 (-86.18%)
Mutual labels:  gradle, gradle-plugin

Gradle static analysis plugin

Bintray

A Gradle plugin to easily apply the same setup of static analysis tools across different Android, Java or Kotlin projects.

Supports Task Configuration Avoidance so that you have zero overhead in build speeds when you use this plugin!

Description

Gradle supports many popular static analysis (Checkstyle, PMD, FindBugs, etc) via a set of built-in plugins. Using these plugins in an Android module will require an additional setup to compensate for the differences between the model adopted by the Android plugin compared to the the Java one.

The gradle-static-analysis-plugin aims to provide:

  • flexible, configurable penalty strategy for builds
  • easy, Android-friendly integration for all static analysis
  • convenient way of sharing same setup across different projects
  • healthy, versionable and configurable defaults

Supported tools

The plugin supports various static analysis tools for Java, Kotlin and Android projects:

Please note that the tools availability depends on the project the plugin is applied to. For more details please refer to the supported tools page.

Tools in-consideration

  • CPD (Duplicate Code Detection) #150
  • error-prone #151
  • Jetbrains IDEA Inspections #152

For all tools in consideration, please refer to issues.

Out-of-the-box support for Android projects

Android projects use a Gradle model that is not compatible with the Java one, supported by the built-in static analysis tools plugins. Applying gradle-static-analysis-plugin to your Android project will make sure all the necessary tasks are created and correctly configured without any additional hassle.

Add the plugin to your project

Apply the plugin from jCenter as a classpath dependency

buildscript {
    repositories {
       jcenter()
    }
    dependencies {
        classpath 'com.novoda:gradle-static-analysis-plugin:1.2'
    }
}

apply plugin: 'com.novoda.static-analysis'

or from the Gradle Plugins Repository:

plugins {
    id 'com.novoda.static-analysis' version '1.2'
}

Simple usage

A typical configuration for the plugin will look like:

staticAnalysis {
    penalty {
        maxErrors = 0
        maxWarnings = 0
    }
    checkstyle { }
    pmd { }
    findbugs { }
    spotbugs { }
    detekt { }
    lintOptions { }
}

This will enable all the tools with their default settings and create evaluateViolations task. Running ./gradlew evaluateViolations task will run all configured tools and print the reports to console. For more advanced configurations, please refer to the advanced usage and to the supported tools pages.

Sample app

There are two sample Android projects available, one consisting of a regular app - available here - and the other comprising a multi-module setup available here. Both sample projects showcase a setup featuring Checkstyle, FindBugs, SpotBugs, PMD, Lint, Ktlint and Detekt.

Snapshots

CI status Download from Bintray

Snapshot builds from develop are automatically deployed to a repository that is not synced with JCenter. To consume a snapshot build add an additional maven repo as follows:

repositories {
    maven {
        url 'https://dl.bintray.com/novoda-oss/snapshots/'
    }
}

You can find the latest snapshot version following this link.

Roadmap

This project is routinely used by many Novoda projects and by other external projects with no known critical issues.

Future improvements and new tool integrations can be found on the repository's issue tracker.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].