creadur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <>
Subject [jira] [Commented] (RAT-161) Support exclusion of paths: "path/to/file.ext"
Date Tue, 10 Jun 2014 13:41:01 GMT


Dennis Lundberg commented on RAT-161:

Hi Erik,

First some questions that are not really related to your question. Are you using Rat from
the command line today? What build tool is Spark using? Perhaps it would be easier for you
to use either the Ant task or Maven plugin for Rat.

As far as I understand it, the -E option specifies a file that contains regular expressions
which are then used as exclude patterns. There is also the -e option which can be used to
specify an exclude pattern directly. Some examples might explain better:

rat -E file-that-contains-regular-expressions
rat -e pattern-for-files-that-should-be-excluded

Over at the Maven project we use the Maven plugin to run Rat, and there we use the excludes
configuration, which corresponds to the -e option, see

Here is an example:

                This file must not contain a license header, because the test is
                supposed to report an error because of a missing license header.
                These are license header templates.
                File from the Checkstyle distribution - do not add our own license header.

Note that the code you referred to in SPARK-1493 is a very old branch from when Rat was first
accepted into the Incubator. Current code is in svn here:

> Support exclusion of paths:   "path/to/file.ext"
> ------------------------------------------------
>                 Key: RAT-161
>                 URL:
>             Project: Apache Rat
>          Issue Type: New Feature
>          Components: reports
>            Reporter: Erik Erlandson
>            Priority: Minor
>             Fix For: 0.11
> It would be advantageous to be able to exclude specific files, e.g. "path/to/file.ext"
> The current '-E' feature cannot do this, as the filter patterns are only applied to individual
files as directory tree is traversed, so a filter will never see "path/to/file.ext", only
"path", "to" and "file.ext"
> See for example: SPARK-1493

This message was sent by Atlassian JIRA

View raw message