-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add Pre-commit Copyright Check #181
Conversation
Signed-off-by: YanxuanLiu <[email protected]>
We also need to run a required check for missing copyrights in a self-hosted CI or in a GH runner. There may be better solutions like Maven RAT and pre-commit hooks but I used the following command to find files with missing headers for #180 yielding
If it is confirmed as a legitimate set of files without license headers, in this PR we should store it as the list of excluded files / wildcards. The PR check will then look if an additional violation is introduced that is not covered by the exclusion list. |
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Added
|
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.
Looks good to me
I think we can also application these license check actions into other GitHub spark projects like spark-rapids-jni/spark-rapids/spark-rapids-ml/spark-rapids-examples, etc. |
+1, cc @GaryShen2008 regarding common build infra offline conversation on this topic
|
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.
We may first start with our own shell-script based check to the tune of #181 (comment)
because this check is not yet approved to run in our account
Error: .github#L1
viperproject/check-license-header@v2 is not allowed to be used in NVIDIA/spark-rapids-benchmarks. Actions in this workflow must be: within a repository that belongs to your Enterprise account
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.
That's too bad, let me build another script for this check.
Signed-off-by: YanxuanLiu <[email protected]>
Replaced third party function with Now the action can run as expected. |
We can see if the check is working in the status of the PR introducing it. This iteration is not a complete fix https://github.com/NVIDIA/spark-rapids-benchmarks/actions/runs/7707505941/job/21004813999?pr=181 We need more excludes
|
Signed-off-by: YanxuanLiu <[email protected]>
Added more excludes: |
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.
LGTM
fix #169
Add
auto-copyright
scripts to check and auto-correct copyright inpre-commit
process.fix #179
Add
Check License Headers
Action to check if files have a license header.You can define the license check rules in
.github/workflows/license-check/license-check.py