On 2011-03-12, Marvin Humphrey wrote:

> Greets,

> What it the syntax for the --exclude/-e command line option?

> Let's say I would like to exclude a file at the following location:

>     $TRUNK/modules/analysis/snowstem/source/runtime/api.c

> These work...

>     -e api.c
>     -e *.c
>     -e *api.c

> ... but these don't:

>     -e modules/analysis/snowstem/source/runtime/api.c

RAT creates a commons-io WildcardFileFilter from each exclude provided
which behaves like Unix glob matchers (* and ? work like expected),
except that they are applied to the children of a directory
immediately.  This means you can only match on the filename but not on
its path.

>     -e */*/*/*/*/api.c

Same here.  Wildcards are not useful except inside the file name as in
*~ or something similar.

> For obvious reasons, it's not acceptable to exclude on filename or file
> extension alone.

But this is the only exclusion mechanism that is currently implemented
inside the CLI, sorry.

My guess is that most users of RAT don't use the CLI but either the
Maven plugin or the Ant task which both provide superior methods to
filter the files to be checked.

Stefan

Reply via email to