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

Builtin year constant #5

Closed
sagikazarmark opened this issue Oct 2, 2020 · 4 comments
Closed

Builtin year constant #5

sagikazarmark opened this issue Oct 2, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@sagikazarmark
Copy link

Add a builtin constant for the current year. It would also be nice, if go header could validate headers that contain previous years, since they don't have to be updated.

@denis-tingaikin
Copy link
Owner

It would also be nice, if go header could validate headers that contain previous years, since they don't have to be updated.

Actually, it is a problem only if go-header using under golangci-linter. Directly can be used something like go-header $(git diff --name-only)

Also, I think this case should work fine if golangci linter has an option -new, but if golangci linter works with the full project then it is a problem :)

I'll try to discuss this problem with golangci-team.

@denis-tingaikin denis-tingaikin added the bug Something isn't working label Oct 2, 2020
@denis-tingaikin denis-tingaikin self-assigned this Oct 2, 2020
@sagikazarmark
Copy link
Author

I think it makes sense to support old files as well. For example, if the template changes, I'd expect old files to be updated as well, so I should be able to lint everything, too.

denis-tingaikin added a commit that referenced this issue Dec 27, 2020
2. Code cleanup

Signed-off-by: Denis Tingajkin <[email protected]>
@denis-tingaikin
Copy link
Owner

denis-tingaikin commented Dec 28, 2020

Should be fixed in golangci since v1.34.0.

@denis-tingaikin
Copy link
Owner

Closing this. Let me know if something still not working as expected :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants