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

Enforce copyright notices at pre-commit or CI level #73

Open
jgsogo opened this issue Mar 9, 2023 · 1 comment
Open

Enforce copyright notices at pre-commit or CI level #73

jgsogo opened this issue Mar 9, 2023 · 1 comment

Comments

@jgsogo
Copy link
Contributor

jgsogo commented Mar 9, 2023

From #63 (comment)

Every source file needs to have a copyright notice in the first lines. When changing a file, we have to update this copyright notice with the year it was last modified. Of course it can happen at most once every year for each file.... however many contributors (and reviewers) might forget about it.

Is there anything we can do as a pre-commit hook or CI level to check that these notes are updated?

cc/ @taalexander

@mtreinish
Copy link

You can adapt this script and run it as part of a ci job https://github.com/Qiskit/qiskit-terra/blob/main/tools/verify_headers.py that will error if a source file is missing the appropriate header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants