Make Checkstyle's suppresion rule file to ignore path separator

181 Views Asked by At

We have a suppressions.xml file, where we used rules such as:

<suppress checks="JavadocPackage" files="/impl/"/>

This worked for anyone on Unix or Mac OS X. However on windows the files in that package don't match. We had to rewrite it as follows:

<suppress checks="JavadocPackage" files="[\\/]impl[\\/]"/>

However, this is ugly, especially with longer paths. Is there a trick to make it work with unix-style paths on Windows?

0

There are 0 best solutions below