You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robin Karlsson (JIRA)" <ji...@apache.org> on 2019/03/26 06:52:00 UTC

[jira] [Created] (MCHECKSTYLE-372) Missing cache file invalidation when suppressionsLocation file is modified

Robin Karlsson created MCHECKSTYLE-372:
------------------------------------------

             Summary: Missing cache file invalidation when suppressionsLocation file is modified
                 Key: MCHECKSTYLE-372
                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-372
             Project: Maven Checkstyle Plugin
          Issue Type: Bug
    Affects Versions: 3.0.0
            Reporter: Robin Karlsson


I came across some buggy behavior with suppressions file and the cache file.

Steps to reproduce:
1. Have code with violations.
2. Run checkstyle:check.
3. Add a suppressions file (with suppressionsLocation) that suppress the violations.
4. Re-run checkstyle:check. Violations are suppressed as expected.
5. Modify suppressions file so that the violations are no longer suppressed.
6. Re-run checkstyle:check. No violations, even though they shouldn't be suppressed.

Work-arounds:
* Disable the use of cache file.
* Include the suppressions file from the config file instead of with suppressionsLocation in the plugin config.

Is this a known issue?
Is this by design?
For performance reasons you might not want to wipe the cache file when the suppression file is modified (but AFAICT that's what Checkstyle does when a suppressions file is included via the config).

On the other hand, this bit me because I modified a regexp in the suppression file so that it accidentally no longer suppressed what it was supposed to suppress.
Since I didn't get any violations I thought it still worked. But when the cache file got reset the violations came back.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)