You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@creadur.apache.org by "Stefan Bodewig (JIRA)" <ji...@apache.org> on 2011/03/11 15:13:01 UTC

[jira] Updated: (RAT-86) License insertion doesn't work with just the -a and/or -a -f options.

     [ https://issues.apache.org/jira/browse/RAT-86?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Bodewig updated RAT-86:
------------------------------

    Affects Version/s:     (was: 0.8)
                       0.7
        Fix Version/s: 0.8

> 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.7
>         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
>             Fix For: 0.8
>
>
> 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