License insertion doesn't work with just the -a and/or -a -f options.
---------------------------------------------------------------------
Key: RAT-86
URL: https://issues.apache.org/jira/browse/RAT-86
Project: RAT
Issue Type: Bug
Affects Versions: 0.8
Environment: Mac OSX, java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
Reporter: Marlon Pierce
This bug applies to the SVN checkout. org.apache.rat.Report's command line
processing logic seems flawed: if you want to insert a license header in your
files (-a or -a -f), and unless you specify a stylesheet with the -s option,
the report creation goes through report.styleReport(), which throws away any
previously specified configuration settings:
pubic void styleReport(..) {
...
final ReportConfiguration configuration = new ReportConfiguration();
...
}
I assume you want something somewhat like
public void styleReport(PrintStream out, ReportConfiguration pConfiguration)
throws Exception {
final IReportable base = getDirectory(out);
if (base != null) {
InputStream style = Defaults.getDefaultStyleSheet();
pConfiguration.setHeaderMatcher(Defaults.createDefaultMatcher());
report(out, base, style, pConfiguration);
}
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira