Skip to content
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

[CI] Clarify RAT exclude patterns. #3328

Merged
merged 3 commits into from
Jun 11, 2019
Merged

[CI] Clarify RAT exclude patterns. #3328

merged 3 commits into from
Jun 11, 2019

Conversation

mshawcroft
Copy link
Contributor

RAT exclude patterns are not matched across path separators. Patterns
of the form xyz/* will match files and directories named xyz anywhere
in the tree because the regexp /* contracts to "". Adjust the
existing rat exclude patterns that appear to contain matches with path
separators to be explicit about the pattern they actually match.

@tqchen tqchen mentioned this pull request Jun 10, 2019
@tqchen
Copy link
Member

tqchen commented Jun 10, 2019

Given that the original rat is relatively simpler and perhaps ignores only a bit more. I incline to keep the original pattern, so when users check manually with rat we won't get as long messages

@mshawcroft
Copy link
Contributor Author

@tqchen are you commenting on the first or second patch here?

# their position on the directory tree we use a secondary mechanism
# that can match patterns across / seperators.
cat > /tmp/$$.ignore-re.txt <<EOF
== File: \./jvm/[^/]*/[^/]*/target/.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifically, these additional ignore patterns seem complicates the checking process. It would be great to keep the original rat-exclude patterns without having to check in here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised with two new patterns in rat-exclude for jvm and tutorials.

RAT exclude patterns are not matched across path separators.  Patterns
of the form xyz/* will match files and directories named xyz anywhere
in the tree because the regexp /* contracts to "".  Adjust the
existing rat exclude patterns that appear to contain matches with path
separators to be explicit about the pattern they actually match.
The build process generates artificats into jvm/../targets and
docs/../tutorials subdirectories, many of which trigger RAT.

RAT exclude syntax does not match path separators so it is not
possible to target specific built directories.

This patch tells RAT to ignore and file or directory named 'jvm' and
'tutorials' irrespective of where they are located.

This choice is conservative, and may result in source files being
ingored from the RAT scan.
@tqchen tqchen merged commit d6c4aba into apache:master Jun 11, 2019
@tqchen
Copy link
Member

tqchen commented Jun 11, 2019

Thanks @mshawcroft

@mshawcroft mshawcroft deleted the ci-2 branch June 13, 2019 14:53
wweic pushed a commit to wweic/tvm that referenced this pull request Jun 26, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants