Skip to content

Run critical lint rules only

Martin Chalupa edited this page Apr 2, 2018 · 1 revision

Run critical lint rules only

Critical rules represent checks for really harmful patterns in your build files. When such pattern is detected you would like to stop the build process. Unfortunately, automatic lint execution is happening as the last step so it is too late if you want to prevent e.g. publishing project artifacts. For this reason, you can use task criticalLintGradle which is provided by the root project after applying the lint plugin. You can use standard Gradle capabilities to create a dependency between tasks and run a critical rules verification before publishing.