-1

I have a checkstyle check RegexpHeader which checks for a regular expression in every files in my source. However, I want to suppress the check for all the files except package-info files. The suppression.xml file has the following suppress check:

<suppress checks="RegexpHeader" files="^(?!package\.java).*$"/>

It seems like the check is suppressed even in package-info files as it does not throw any errors.

Socowi
  • 25,550
  • 3
  • 32
  • 54

1 Answers1

2

You just excluded "package.java" files. Try ading the "-info" part. This would be:

^(?!package-info\.java).*$
Impulse The Fox
  • 2,638
  • 2
  • 27
  • 52