Giter Site home page Giter Site logo

gradle-warnings-plugin's Introduction

Gradle Warnings Plugin

What is it?

A Gradle plugin to produce a report of the warnings output by the compiler. This improves the visibility of these warnings, which many would just ignore if using an IDE to compile the code.

Such reports exist in CI systems such as Jenkins, but it's useful to have ways to get a warning report locally before pushing changes to code.

This was mostly created as a reaction to SonarQube not showing the actual compiler warnings. SonarQube encourages developers to fix whatever it considers to be an issue, while frequently overlooking compiler warnings. This was causing developers to spend time just satisfying SonarQube rather than improving the quality of the code or the speed of the build by reducing the actual warning count.

Usage

Using the plugins DSL:

plugins {
    id("garden.ephemeral.warnings") version "VERSION"
}

Using legacy plugin application:

buildscript {
    dependencies {
        classpath("garden.ephemeral.gradle.warnings:gradle-warnings-plugin:VERSION")
    }
}
apply(plugin = "garden.ephemeral.warnings")

Producing the report:

./gradlew warningsReport

Customising the report location:

tasks.named<garden.ephemeral.gradle.warnings.WarningsReport>("warningsReport") {
    reports {
        html.outputLocation.set(file("$buildDir/custom"))
    }
}

Enabling CSV or JSON reports:

tasks.named<garden.ephemeral.gradle.warnings.WarningsReport>("warningsReport") {
    reports {
        csv.required.set(true)
        json.required.set(true)
    }
}

Disabling the report:

tasks.named<garden.ephemeral.gradle.warnings.WarningsReport>("warningsReport") {
    reports {
        html.required.set(false)
    }
}

gradle-warnings-plugin's People

Contributors

hakanai 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.