-
Notifications
You must be signed in to change notification settings - Fork 5
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 copyright hook #2
Comments
For the initial copyright year, I'm thinking we should simply enforce a "no-later-than" policy to handle the squashing issue. It would enforce the initial year to be either the year it was first committed or the initial year that's already listed, whichever is earlier. We don't know if the actual copyright year is earlier than the first commit, but we certainly do know that it's not later. |
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 19, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 19, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 19, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 19, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 19, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 19, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 19, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 20, 2024
Fixes: rapidsai#2
Merged
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 20, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
to KyleFromNVIDIA/pre-commit-hooks
that referenced
this issue
Jan 22, 2024
Fixes: rapidsai#2
KyleFromNVIDIA
added a commit
that referenced
this issue
Jan 29, 2024
* Add copyright check Fixes: #2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first hook that we would like to support is for checking copyright headers to ensure that they are up to date. The copyright script that we would like to adapt is already present in a few repos such as cudf. The purpose of this issue is to capture discussions that we have had recently regarding issues with this script, discuss potential workarounds, and determine a path forward.
The current script tends to work well for our style checks in CI, but it occasionally runs into issues on local runs where it incorrectly identifies modified files, resulting in updated copyrights for unmodified files. Here are some of the solutions suggested so far:
--all-files
result in errors on foo.hpp/merge
GH command to account for this discrepancy by performing a squash and copyright update prior to doing the squash merge on GH, but we rejected this solution as requiring too much engineering effort.Given the above considerations, our current best path forward may be simply using the existing script and trying to identify its weak points. @ajschmidt8 and I considered the possibility of including further git logic into the copyright script to verify whether the relevant git target branches are sufficiently up-to-date. If we went this route, my inclination would be to throw errors rather than do any implicit git actions in the hook, but we may at least be able to provide more robust error modes in this way and avoid incorrect modifications.
The text was updated successfully, but these errors were encountered: