[ 
https://issues.apache.org/jira/browse/RAT-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497020#comment-14497020
 ] 

Philipp Ottlinger commented on RAT-171:
---------------------------------------

SCM ignore files are only checked and taken into account from the project base 
directory.

You can define RAT ignores as Java regular expressions. Taken from RAT's own 
pom.xml:
{code}
<exclude>apache-rat/README*.txt</exclude>
<exclude>apache-rat-core/src/test/resources/**</exclude>
<exclude>apache-rat*/target/**</exclude>
<exclude>apache-rat-plugin/src/test/resources/**</exclude>
<exclude>apache-rat-plugin/src/it/**</exclude>
<exclude>apache-rat-tasks/src/test/resources/**</exclude>
{code}

I assume that there are some cases where the SCM ignore allows a more complex 
handling of ignores as our line-by-line-reading takes care of.
Thus I've added some erroneous ignores only in the RAT integration test (added 
as .bzrignore).

If you feel that the functionality is not helpful or experience strange RAT 
runs, you may turn it of or file a bug.

> Allow exclude patterns to be read from a file or files
> ------------------------------------------------------
>
>                 Key: RAT-171
>                 URL: https://issues.apache.org/jira/browse/RAT-171
>             Project: Apache Rat
>          Issue Type: New Feature
>    Affects Versions: 0.11
>            Reporter: Ignasi Barrera
>            Assignee: Philipp Ottlinger
>             Fix For: 0.12
>
>         Attachments: RAT-171.patch
>
>
> h3. Context
> The apache-rat-plugin ignores by default the .gitignore files. However, for 
> every file/pattern added to those files, an explicit exclusion must be set in 
> the plugin's configuration.
> Given that git-ignored files won't be uploaded to the SCM and shouldn't be 
> part of a release, it would be nice that the apache-rat-plugin automatically 
> considered those git-ignored files as implicit exclusions.
> h3. Implemented for 
> Currently implemented for the following soure code management systems:
> * SVN
> * Git
> * Bazaar
> * Mercurial and 
> * CVS.
> h3. Example usage
> You can configure parsing SCM ignore files by a environment variable 
> {code}
> mvn -U -debug -Drat.parseSCMIgnoresAsExcludes=true
> {code}
> or in your configuration section of apache-rat-maven plugin 
> {code}
> <parseSCMIgnoresAsExcludes>true</true>
> {code}
> This features is enabled by default.
> In case you want to speed up the build you may disable it and set it to 
> {code}
> false
> {code}
> .



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to