All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.nebula.lint.plugin.LintPluginTaskConfigurer.groovy Maven / Gradle / Ivy

Go to download

Pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts

There is a newer version: 20.2.2
Show newest version
package com.netflix.nebula.lint.plugin

import org.gradle.api.Action
import org.gradle.api.Project

class LintPluginTaskConfigurer extends GradleLintPluginTaskConfigurer {
    @Override
    Action configureReportAction(Project project, GradleLintExtension extension) {
        new Action() {
            @Override
            void execute(GradleLintReportTask gradleLintReportTask) {
                gradleLintReportTask.reportOnlyFixableViolations.set(getReportOnlyFixableViolations(project, extension))
                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