Skip to content

SuppressionFilter with ${baseDir} and notifications #231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Geniy00 opened this issue May 31, 2016 · 3 comments
Open

SuppressionFilter with ${baseDir} and notifications #231

Geniy00 opened this issue May 31, 2016 · 3 comments

Comments

@Geniy00
Copy link

Geniy00 commented May 31, 2016

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.

@Geniy00
Copy link
Author

Geniy00 commented Jun 1, 2016

As a simple solution I can turn off checkstyle notification in IDEA
Event Log\Settings, then find Checkstyle and chose "No popup"

@jshiell
Copy link
Owner

jshiell commented Jun 1, 2016

Thanks for the report!

We currently don't support the optional flag - I'll have a look at adding that, hopefully this weekend.

On the exclude files, I'll have a look at what's going on - it's entirely possible it's resolving it once and then failing to do so again, as basedir should indeed be mapped to the base dir of the current module if it's not explicitly defined (as it is for Eclipse-CS).

@jshiell
Copy link
Owner

jshiell commented Jun 5, 2016

As of 4.29.0 the optional property should now be taken into account when files are missing.

Part two will have to wait a bit I fear, as my head is mush with hay fever 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants