No license header added for java files that do not contain project line
-----------------------------------------------------------------------

                 Key: RAT-34
                 URL: https://issues.apache.org/jira/browse/RAT-34
             Project: RAT
          Issue Type: Bug
    Affects Versions: 0.6
            Reporter: Gavin
             Fix For: 0.6


When using the -a cmd line switch to automatically add license headers to java 
files, no license headers will be added unless the java file contains the 
'package' line. This is currently by design. Ideas for change include :-

1. Do nothing (almost) - Document that a package line must exist and that the 
license will be appended after that line. Therefore you are actively forcing 
this limitation as an intentional design feature.

If this route is chosen then you should bail out without writing a .new file if 
there is no package line, perhaps with a WARNING message appended to the 
output. A .new file is currently written anyway because the file has already 
been opened and written ("\n") to before that 'package' check above.

2. If no package line exists then put the license in anyway at the very top.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to