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] pre-commit: auto add license check for Java files #1807

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

jbampton
Copy link
Member

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

  • No this is a CI update. The PR name follows the format [CI] my subject

What changes were proposed in this PR?

Added another check/hook/test to our pre-commit framework. This hook will auto add a license header to Java files on git commit if they are missing the license. So far all Java files seem to have the correct license so this is just a check to stop regressions and keep the code base standardized. Small piece of automation to auto add missing license headers.

How was this patch tested?

Added the license hook and then ran pre-commit for all files. No Java files were modified. I did test by changing / modifying a Java license and it did fail the hook test locally for that file.

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the documentation.

@jbampton jbampton self-assigned this Feb 12, 2025
@jbampton jbampton requested a review from jiayuasu as a code owner February 12, 2025 19:34
@github-actions github-actions bot added the root label Feb 12, 2025
@jiayuasu jiayuasu merged commit ae4b1c2 into apache:master Feb 12, 2025
4 checks passed
@jbampton jbampton deleted the pre-commit-java-license-headers branch February 12, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants