checkstyle-idea icon indicating copy to clipboard operation
checkstyle-idea copied to clipboard

Supressions file to ignore rules for test source is unreliable

Open Martin-Entwistle-i2 opened this issue 2 years ago • 1 comments

We have a main CheckStyle configuration, and a few exceptions for test src. So we are using a suppressions xml file

for example: <suppress checks="MagicNumberCheck" files=".*[\\/]test[Fixtures]*[\\/].*.java" />

When a test file is opened, all seems OK: no warnings, but after editing the file, the suppressions seem to get "forgotten" and the file lights up with warnings which should be being suppressed.

Martin-Entwistle-i2 avatar Jul 29 '22 21:07 Martin-Entwistle-i2

Thanks for the report. So far, I've been unable to reproduce this - the suppressions seem stable, and once I've added this to the file I can't get it to generate a MagicNumber error in a matching file.

Do you have any ideas of what else could be contributing to it (e.g. do you keep the suppressions on a network drive or similar)? Or any other useful data, e.g. OS, plugin version, Checkstyle version, full rules file?

Aside, nothing to do with the issue - .*[\\/]test(Fixtures)?[\\/].*\.java might be more accurate, if I've understood your intentions correctly.

jshiell avatar Aug 06 '22 09:08 jshiell

Closed due to no further updates.

jshiell avatar Mar 29 '24 16:03 jshiell