[
https://issues.apache.org/jira/browse/RAT-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677762#action_12677762
]
David Crossley commented on RAT-42:
-----------------------------------
Process and results ...
See RAT-39 for fixing SVN issues before starting.
-----------------
Now ready to do 'insert_license.pl' in practice mode to summarise the licenses.
See
https://svn.apache.org/repos/private/committers/relicense/src/perl/relicense.txt
./insert_license.pl -p /svn/asf/rat-incubator >
~/Documents/work/incubator-rat/license-scan.txt
> Doing practice run. No files will be written
>
> Total 211 text files were investigated.
> New licenses would be inserted in 10 files.
> Skipped 193 files with an existing license:
> (Apache v2.0=0, v2.0a=0, v2.0b=183)
> (Apache v1.2=0, v1.1=0, v1.0=0)
> (Other=2, PublicDomain=0)
> (3rdParty using AL v2.0=8, v1.2=0, v1.1=0)
> Skipped 0 XML files with missing XML Declaration.
>
> Ignored 7 files of specified type (.txt .dcl .ent .pen .project)
> Skipped 1 files of unknown type.
>
> WARNING: 2 files had another license as well as the new
> Apache v2.0 license. (Scan the log output for lines with "WARN: dual".)
>
> List of unknown filename extensions and ignored filename extensions:
> (Add new fileTypes to this script if you want them to be catered for.)
> .apt=9 .txt=10 NoExtension=2
>
> List of all unique filename extensions:
> .apt=9 .fml=1 .html=4 .java=158 .properties=2 .py=1 .txt=10 .xml=22 .xsl=2
> NoExtension=2
>
> Finished practice run.
-----------------
See the summary above and review the output logfile.
grep "WARN: dual" license-scan.txt
Two files that have "license" words in the body, and so trigger the license
scanner.
Add those pathname patterns to file rat-avoid.txt
grep "licenseType=Other" license-scan.txt
All okay, added patterns to rat-avoid.txt
-----------------
Investigate the eight "3rdParty using AL v2.0" license headers that were
reported.
grep "licenseType=F-AL-20" license-scan.txt
Most of them are just using a license header pattern that 'insert_license.pl'
is not handling, so could add that handling to the script. In this case it is
for "*.apt files, whatever they are.
However, two are real positive hits:
apache-rat-core/src/main/java/org/apache/rat/analysis/license/W3CDocLicense.java
apache-rat-core/src/test/resources/elements/Text.txt
-----------------
That leaves the 10 files that will get licenses inserted.
grep "Insert new license" license-scan.txt
Some are generated javadoc files. Add patterns to rat-avoid.txt
Some are in the test area and some are very basic files. I just add the license
header anyway, that way everyone knows what they can do with the file.
The others are genuine missing license headers.
-----------------
Do another practice run, this time using the "avoid" file.
./insert_license.pl -p /svn/asf/rat-incubator
~/Documents/work/incubator-rat/rat-avoid.txt >
~/Documents/work/incubator-rat/license-scan.txt
> Doing practice run. No files will be written
>
> Total 202 text files were investigated.
> New licenses would be inserted in 7 files.
> Skipped 189 files with an existing license:
> (Apache v2.0=0, v2.0a=0, v2.0b=181)
> (Apache v1.2=0, v1.1=0, v1.0=0)
> (Other=0, PublicDomain=0)
> (3rdParty using AL v2.0=8, v1.2=0, v1.1=0)
> Skipped 0 XML files with missing XML Declaration.
> Avoided 9 files as specified in the avoidList
>
> Ignored 6 files of specified type (.txt .dcl .ent .pen .project)
> Skipped 0 files of unknown type.
> List of all unique filename extensions:
> .apt=9 .fml=1 .html=1 .java=156 .properties=2 .py=1 .txt=8 .xml=22 .xsl=2
>
> Finished practice run.
-----------------
The summary and the output look now look correct, so insert licenses:
./insert_license.pl /svn/asf/rat-incubator
~/Documents/work/incubator-rat/rat-avoid.txt >
~/Documents/work/incubator-rat/license-scan.txt
Do 'svn diff' ... as expcected. See patch-RAT-42.txt
> independent scan of RAT own source files for license issues
> -----------------------------------------------------------
>
> Key: RAT-42
> URL: https://issues.apache.org/jira/browse/RAT-42
> Project: RAT
> Issue Type: Task
> Affects Versions: 0.6
> Reporter: David Crossley
> Fix For: 0.6
>
>
> Run an independent scan of RAT to assess its own source files.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.