-
Notifications
You must be signed in to change notification settings - Fork 3k
Build/Release: Upgrade to RAT 0.17 #15145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kevinjqliu
wants to merge
9
commits into
apache:main
Choose a base branch
from
kevinjqliu:kevinjqliu/rat-upgrade
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e0c70e1
upgrade rat to use 0.17
kevinjqliu 9f73c55
translate exclusion expression
kevinjqliu 4ddd832
fix script
kevinjqliu 98ada16
simplify
kevinjqliu 04e40fa
config
kevinjqliu 9f33e91
explicit
kevinjqliu b126586
test, this should fail
kevinjqliu 9642d17
Revert "test, this should fail"
kevinjqliu ca41869
scan hidden dir
kevinjqliu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ else | |
| declare java_cmd=java | ||
| fi | ||
|
|
||
| export RAT_VERSION=0.16.1 | ||
| export RAT_VERSION=0.17 | ||
| export rat_jar="$FWDIR"/lib/apache-rat-${RAT_VERSION}.jar | ||
| mkdir -p "$FWDIR"/lib | ||
|
|
||
|
|
@@ -67,20 +67,11 @@ mkdir -p "$FWDIR"/lib | |
| exit 1 | ||
| } | ||
|
|
||
| mkdir -p build | ||
| $java_cmd -jar "$rat_jar" --scan-hidden-directories -E "$FWDIR"/dev/.rat-excludes -d "$FWDIR" > build/rat-results.txt | ||
| $java_cmd -jar "$rat_jar" \ | ||
| --input-exclude-file "$FWDIR"/dev/.rat-excludes \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why we are not scanning hidden directories any more?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch, we should! |
||
| --input-include-std HIDDEN_DIR \ | ||
| --output-style missing-headers \ | ||
| --log-level ERROR \ | ||
| -- "$FWDIR" || exit 1 | ||
|
|
||
| if [ $? -ne 0 ]; then | ||
| echo "RAT exited abnormally" | ||
| exit 1 | ||
| fi | ||
|
|
||
| ERRORS="$(cat build/rat-results.txt | grep -e "??")" | ||
|
|
||
| if test ! -z "$ERRORS"; then | ||
| echo "Could not find Apache license headers in the following files:" | ||
| echo "$ERRORS" | ||
| exit 1 | ||
| else | ||
| echo -e "RAT checks passed." | ||
| fi | ||
| echo "RAT checks passed." | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
about the new regex syntax.
**/build/**, matches any folder name "build".git/**, matches top level dir name.gitand excludes all its filesdev/.rat-excludes, matches this 1 file explicitly**/LICENSE, matches any file name "LICENSE"**/*.sql, matches any file with.sqlsuffix