Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude more then one path from error prone?

Tags:

errorprone

I would like to exclude a few directories form error prone. I was trying to use a XepExcludedPaths flag but it seems that it works only for the one path which is a regular expresion of excluded location.

options.errorprone.errorproneArgs.add("-XepExcludedPaths:.*/legacy/model/.*")

works

options.errorprone.errorproneArgs.add("-XepExcludedPaths:.*/new/model/.*,.*/build/.*")

doesn't

Is it possible? I used wrong separator?

like image 732
tomasz-mer Avatar asked Sep 19 '25 21:09

tomasz-mer


1 Answers

It's a single regular expression (literally compiled using Pattern.compile), so use a pipe instead of a comma:

options.errorprone.errorproneArgs.add("-XepExcludedPaths:(.*/new/model/.*|.*/build/.*)")

or

options.errorprone.errorproneArgs.add("-XepExcludedPaths:.*/(new/model|build)/.*")
like image 113
Andy Turner Avatar answered Sep 22 '25 17:09

Andy Turner