All Projects → nebula-plugins → Gradle Lint Plugin

nebula-plugins / Gradle Lint Plugin

Licence: apache-2.0
A pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts.

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Gradle Lint Plugin

Checkmake
experimental linter/analyzer for Makefiles
Stars: ✭ 420 (-11.21%)
Mutual labels:  linter, lint
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+860.04%)
Mutual labels:  linter, lint
elint
A easy way to lint your code
Stars: ✭ 38 (-91.97%)
Mutual labels:  lint, linter
JSONCustomLintr
Library to allow creation, running, and reporting of custom lint rules for JSON files
Stars: ✭ 19 (-95.98%)
Mutual labels:  lint, linter
Awesome Lint
Linter for Awesome lists
Stars: ✭ 385 (-18.6%)
Mutual labels:  linter, lint
Format.cmake
💅 Stylize your code! Automatic clang-format and cmake-format targets for CMake.
Stars: ✭ 94 (-80.13%)
Mutual labels:  lint, linter
Gradle Code Quality Tools Plugin
Gradle plugin that generates ErrorProne, Findbugs, Checkstyle, PMD, CPD, Lint, Detekt & Ktlint Tasks for every subproject.
Stars: ✭ 282 (-40.38%)
Mutual labels:  gradle, lint
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 (-92.39%)
Mutual labels:  gradle, linter
Linter
Linter for Dart.
Stars: ✭ 372 (-21.35%)
Mutual labels:  linter, lint
Detekt
Static code analysis for Kotlin
Stars: ✭ 4,169 (+781.4%)
Mutual labels:  linter, lint
eslint-config
An ESLint shareable config that I used in my projects
Stars: ✭ 15 (-96.83%)
Mutual labels:  lint, linter
Ktlint
An anti-bikeshedding Kotlin linter with built-in formatter
Stars: ✭ 4,629 (+878.65%)
Mutual labels:  linter, lint
ue5-style-guide
An attempt to make Unreal Engine 4 projects more consistent
Stars: ✭ 2,892 (+511.42%)
Mutual labels:  lint, linter
selective
Statically find HTML anti patterns using CSS Selectors
Stars: ✭ 15 (-96.83%)
Mutual labels:  lint, linter
pahout
A pair programming partner for writing better PHP. Pahout means PHP mahout 🐘
Stars: ✭ 43 (-90.91%)
Mutual labels:  lint, linter
gandalf-lint
Bad Code Shall Not Pass
Stars: ✭ 29 (-93.87%)
Mutual labels:  lint, linter
flake8-broken-line
🚨 Flake8 plugin to forbid backslashes (\) for line breaks
Stars: ✭ 85 (-82.03%)
Mutual labels:  lint, linter
cpplint
Static code checker for C++
Stars: ✭ 1,014 (+114.38%)
Mutual labels:  lint, linter
Exakat
The Exakat Engine : smart static analysis for PHP
Stars: ✭ 346 (-26.85%)
Mutual labels:  linter, lint
Gitlint
Linting for your git commit messages
Stars: ✭ 404 (-14.59%)
Mutual labels:  linter, lint

Gradle Lint Plugin

Support Status Gradle Plugin Portal Maven Central CI Publish Apache 2.0

Purpose

The Gradle Lint plugin is a pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts and related files. It is inspired by the excellent ESLint tool for Javascript and by the formatting in NPM's eslint-friendly-formatter package.

It assists a centralized build tools team in gently introducing and maintaining a standard build script style across their organization.

Getting Started

Read the full documentation.

To apply this plugin, please get the latest version from the Gradle plugin portal and add the following to build.gradle:

buildscript { repositories { mavenCentral() } }
plugins {
  id 'nebula.lint' version '<latest version from the Gradle plugin portal>'
}

Important: For now, in a multi-module build you must apply lint to the root project, at a minimum.

Alternatively:

buildscript {
  repositories { mavenCentral() }
  dependencies {
    classpath 'com.netflix.nebula:gradle-lint-plugin:latest.release'
  }
}


apply plugin: 'nebula.lint'

Define which rules you would like to lint against:

gradleLint.rules = ['all-dependency'] // add as many rules here as you'd like

For an enterprise build, we recommend defining the lint rules in a init.gradle script or in a gradle script that is included via the Gradle apply from mechanism.

For multimodule projects, we recommend applying the plugin in an allprojects block:

allprojects {
  apply plugin: 'nebula.lint'
  gradleLint.rules = ['all-dependency'] // add as many rules here as you'd like
}

api/implementation support

v15.0.0 introduced api/implementation configuration support.

This allows to show warnings around api/implementation configurations

Since we need to do some major work to keep track of declared configurations and then replace code with the proper configuration, we decided to just show warnings for now.

This work includes finding dependency information for non resolvable configurations so we look into the parents

If gradle/gradle#11106 lands some day, we could definitely enhance this experience.

While it is great to have automatic fix, not having it is worse. So for now warning about this with the same detail as before is much better than a broken experience with new gradle configurations

Warning

Gradle Lint Plugin currently doesn't support:

  • kotlin build scripts. Please, switch to groovy build script if you want to use linting. #166

License

Copyright 2015-2018-2019 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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