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

golangci: fix copyright header linting #351

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Conversation

joshuasing
Copy link
Contributor

Summary
Fix copyright header linting in golangci-lint. The previous config expected the YEAR variable to always be the current year, instead of the last modification year.

This now expects the copyright year to be either the year the file was last modified in (e.g. 2024), or a range of years up-to the year the file was last modified in (e.g. 2024-2025).

Changes

  • Match copyright year against (\\d{4}-{{MOD-YEAR}})|({{MOD-YEAR}}) (where {{MOD-YEAR}} is replaced with the modification year of the file) in goheader linter.

@joshuasing joshuasing added type: bug This is a bug area: ci This is a change to CI files. Excluded from changelog labels Jan 2, 2025
@joshuasing joshuasing requested a review from a team as a code owner January 2, 2025 15:25
@github-actions github-actions bot added the area: make This changes a Makefile label Jan 2, 2025
Copy link
Contributor

@jcvernaleo jcvernaleo left a comment

Choose a reason for hiding this comment

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

OK

@joshuasing joshuasing merged commit 71a3e1f into main Jan 3, 2025
7 checks passed
@joshuasing joshuasing deleted the joshua/fix-lint-copyright branch January 3, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ci This is a change to CI files. Excluded from changelog area: make This changes a Makefile type: bug This is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants