creadur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: PatternSyntaxException when trying rat -E
Date Fri, 05 Apr 2013 03:09:45 GMT
On 4 April 2013 20:42, Peter Hartmann <mailbox.tec@gmail.com> wrote:

> Hello
>
> I'm contributing to Apache Allura incubating project, where my efforts are
> mostly focused on getting a release out. I've attempted a RAT testing, but
> it gives me an error when I try to use -E option:
>
> ~ $: java -jar ../apache-rat-0.8/apache-rat-**0.8.jar -E ./.rat-ignore -d
> ./
> Exception in thread "main" java.util.regex.**PatternSyntaxException:
> Dangling meta character '*' near index 0
> **/setup.cfg
> ^
>         at java.util.regex.Pattern.error(**Pattern.java:1924)
>         at java.util.regex.Pattern.**sequence(Pattern.java:2090)
>         at java.util.regex.Pattern.expr(**Pattern.java:1964)
>         at java.util.regex.Pattern.**compile(Pattern.java:1665)
>         at java.util.regex.Pattern.<init>**(Pattern.java:1337)
>         at java.util.regex.Pattern.**compile(Pattern.java:1022)
>         at org.apache.commons.io.**filefilter.RegexFileFilter.<**
> init>(RegexFileFilter.java:62)
>         at org.apache.rat.Report.main(**Report.java:109)
>
> .rat-ignore file's content is:
>
> .rat-ignore
> **/setup.cfg
> **/*.json
> Makefile.def.buildbot
> requirements*
> **/MANIFEST.in
> Allura/allura/controllers/**controller.template
> Allura/allura/etc/mime.types
> Allura/allura/tests/data/**genshi_hello_tmpl
> Allura/allura/tests/data/test_**mime/text_file.txt
> ForgeGit/forgegit/data/post-**receive_tmpl
> ForgeGit/forgegit/tests/data/
> ForgeSVN/forgesvn/tests/data/
>
> Do I miss something? I've modelled the file after examples given at
> http://ci.apache.org/projects/**rat-master-summary.html<http://ci.apache.org/projects/rat-master-summary.html>
>

It looks like Apache RAT 0.8 uses standard Java wildcard regex file
matching, whereas the original RAT used a different set of wildcard
meta-characters - more like the syntax used by Maven and Ant.

The intended wildcard support does not appear to be documented anywhere, so
it's not clear whether the change is intentional or not.

If you are running RAT from Ant or Maven I think they interpret the
patterns using their own wildcard scheme.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message