com.netflix.nebula.lint.plugin.GradleSevenOneAndHigherLintPluginTaskConfigurer.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-lint-plugin Show documentation
Show all versions of gradle-lint-plugin Show documentation
Pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts
package com.netflix.nebula.lint.plugin
import org.gradle.api.Action
import org.gradle.api.Project
class GradleSevenOneAndHigherLintPluginTaskConfigurer extends GradleSevenZeroLintPluginTaskConfigurer {
@Override
Action configureReportAction(Project project, GradleLintExtension extension) {
new Action() {
@Override
void execute(GradleLintReportTask gradleLintReportTask) {
gradleLintReportTask.reportOnlyFixableViolations = getReportOnlyFixableViolations(project, extension)
gradleLintReportTask.notCompatibleWithConfigurationCache("Gradle Lint Plugin is not compatible with configuration cache because it requires project model")
gradleLintReportTask.reports.all { report ->
def fileSuffix = report.name == 'text' ? 'txt' : report.name
report.conventionMapping.with {
required.set(report.name == getReportFormat(project, extension))
outputLocation.set(project.layout.buildDirectory.file("reports/gradleLint/${project.name}.$fileSuffix"))
}
}
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy