[
https://issues.apache.org/jira/browse/YETUS-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kengo Seki updated YETUS-153:
-----------------------------
Attachment: YETUS-153.00.patch
Attaching a patch. After applying this, asflicense reports correct result:
{code}
[sekikn@mobile yetus]$ precommit/test-patch.sh --build-tool=nobuild
--plugins=all YETUS-78 --asflicense-rat-excludes=/tmp/rat_excludes
--asflicense-rat-jar=/tmp/apache-rat-0.11/apache-rat-0.11.jar
(snip)
-1 overall
_____ _ _ _
| ___|_ _(_) |_ _ _ __ ___| |
| |_ / _` | | | | | | '__/ _ \ |
| _| (_| | | | |_| | | | __/_|
|_| \__,_|_|_|\__,_|_| \___(_)
| Vote | Subsystem | Runtime | Comment
============================================================================
| 0 | reexec | 0m 09s | precommit patch detected.
| +1 | @author | 0m 00s | The patch does not contain any @author
| | | | tags.
| +1 | shellcheck | 0m 01s | There were no new shellcheck issues.
| +1 | whitespace | 0m 00s | Patch has no whitespace issues.
| -1 | asflicense | 0m 01s | Patch generated 1 ASF License warnings.
| | | 0m 17s |
|| Subsystem || Report/Notes ||
============================================================================
| JIRA Patch URL |
https://issues.apache.org/jira/secure/attachment/12769208/YETUS-78.02.patch |
| Optional Tests | asflicense shellcheck |
| uname | Darwin mobile.local 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19
15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64 |
| Build tool | nobuild |
| git revision | YETUS-153 / aa6e15d |
| Default Java | 1.7.0_80 |
| shellcheck | v0.4.1 |
| asflicense | /private/tmp/yetus-15376.8106/patch-asflicense-problems.txt |
| modules | C: U: |
| Powered by | Apache Yetus http://yetus.apache.org |
(snip)
[sekikn@mobile yetus]$ cat
/private/tmp/yetus-15376.8106/patch-asflicense-problems.txt
Lines that start with ????? in the ASF License report indicate files that do
not have an Apache license header:
!????? /Users/sekikn/yetus/precommit/personality/geode.sh
{code}
> asflicense plugin does not work if asflicense-rat-excludes option is specified
> ------------------------------------------------------------------------------
>
> Key: YETUS-153
> URL: https://issues.apache.org/jira/browse/YETUS-153
> Project: Yetus
> Issue Type: Bug
> Components: Test Patch
> Reporter: Kengo Seki
> Attachments: YETUS-153.00.patch
>
>
> The following command seems to succeed...
> {code}
> [sekikn@mobile yetus]$ cat /tmp/rat_excludes
> .gitignore
> .gitattributes
> Gemfile.lock
> assets
> [sekikn@mobile yetus]$ precommit/test-patch.sh --build-tool=nobuild
> --plugins=all YETUS-78 --asflicense-rat-excludes=/tmp/rat_excludes
> --asflicense-rat-jar=/tmp/apache-rat-0.11/apache-rat-0.11.jar
> /tmp/yetus-388.3525 has been created
> (snip)
> ============================================================================
> ============================================================================
> Determining number of patched ASF License errors
> ============================================================================
> ============================================================================
> cd /Users/sekikn/yetus
> /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -jar
> /tmp/apache-rat-0.11/apache-rat-0.11.jar -s
> /private/tmp/yetus-388.3525/asf.xsl -E /tmp/rat_excludes -d
> /Users/sekikn/yetus > /private/tmp/yetus-388.3525/patch-asflicense.txt 2>&1
> Total Elapsed time: 0m 17s
> +1 overall
> ____ _
> / ___| _ _ ___ ___ ___ ___ ___| |
> \___ \| | | |/ __/ __/ _ \/ __/ __| |
> ___) | |_| | (_| (_| __/\__ \__ \_|
> |____/ \__,_|\___\___\___||___/___(_)
>
> | Vote | Subsystem | Runtime | Comment
> ============================================================================
> | 0 | reexec | 0m 07s | precommit patch detected.
> | +1 | @author | 0m 00s | The patch does not contain any @author
> | | | | tags.
> | +1 | shellcheck | 0m 00s | There were no new shellcheck issues.
> | +1 | whitespace | 0m 00s | Patch has no whitespace issues.
> | +1 | asflicense | 0m 01s | Patch does not generate ASF License
> | | | | warnings.
> | | | 0m 17s |
> {code}
> ...but asflicense failed silently.
> {code}
> [sekikn@mobile yetus]$ cat /private/tmp/yetus-388.3525/patch-asflicense.txt
> Mon Nov 2 17:19:01 JST 2015
> cd /Users/sekikn/yetus
> /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -jar
> /tmp/apache-rat-0.11/apache-rat-0.11.jar -s
> /private/tmp/yetus-388.3525/asf.xsl -E /tmp/rat_excludes -d
> /Users/sekikn/yetus
> usage: java rat.report [options] [DIR|TARBALL]
> Options
> -A,--addLicense Add the default licence header to any file
> with an unknown licence that is not in the
> exclusion list. By default new files will
> be created with the licence header, to
> force the modification of existing files
> use the --force option.
> -a,--addLicence Add the default licence header to any file
> with an unknown licence that is not in the
> exclusion list. By default new files will
> be created with the licence header, to
> force the modification of existing files
> use the --force option.
> -c,--copyright <arg> The copyright message to use in the
> licence headers, usually in the form of
> "Copyright 2008 Foo"
> -d,--dir Used to indicate source when using
> --exclude
> -E,--exclude-file <fileName> Excludes files matching regular expression
> in <file> Note that --dir is required when
> using this parameter.
> -e,--exclude <expression> Excludes files matching wildcard
> <expression>. Note that --dir is required
> when using this parameter. Allows multiple
> arguments.
> -f,--force Forces any changes in files to be written
> directly to the source files (i.e. new
> files are not created)
> -h,--help Print help for the Rat command line
> interface and exit
> -s,--stylesheet <arg> XSLT stylesheet to use when creating the
> report. Not compatible with -x
> -x,--xml Output the report in raw XML format. Not
> compatible with -s
> NOTE:
> Rat is really little more than a grep ATM
> Rat is also rather memory hungry ATM
> Rat is very basic ATM
> Rat highlights possible issues
> Rat reports require intepretation
> Rat often requires some tuning before it runs well against a project
> Rat relies on heuristics: it may miss issues
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)