Skip to content

SuppressionFilter with ${baseDir} and notifications #231

Open
@Geniy00

Description

@Geniy00

I have a problem on my environment:
Idea 2016.1.2
Checkstyle-IDEA 4.28.1
checkstyle "6.17"

I have checkstyle config

<module name="SuppressionFilter">
     <property name="file" value="${baseDir}/gradle/checkstyle-exclude.xml"/>
     <property name="optional" value="true"/>
</module>

I've added baseDir variable to checkstyle plugin configuration.

  1. The main problem is that it shown IDEA notifications, when I opened any class
    " The Checkstyle suppression filter file was not found and will be ignored"
    image
    I want to turn it off in some way. You can see that this file is optional for checkstyle config
  2. Next problem that can be important:
    I use gradle multi module project. Checkstyle plugin configuration for gradle is configured in one place in the next way
checkstyle {
    toolVersion = "6.17"
    sourceSets = [sourceSets.main]
    ignoreFailures = true
    showViolations = true
    reportsDir = file("$project.buildDir/checkstyleReports")
    configFile = file("$rootDir/gradle/checkstyle.xml")
    configProperties = ['baseDir': "$project.projectDir"]   //Pay attention
}

baseDir is overridden for each gradle module. I create checkstyle-exclude.xml per module if I need it.
The possible problem is that checkstyle IDEA plugin requires only one fixed exclude rule file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions