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

Remove redundant build tags #1244

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandear
Copy link

@alexandear alexandear commented Mar 11, 2025

This PR removes outdated in Go 1.22 // +build comments by running the command:

go fix -fix buildtag ./...

Additionally, enables revive.redundant-build-tag to detect redundant build tags in the future. This rule introduced by the newest golangci-lint, so I need to update it's version as well.

From https://pkg.go.dev/cmd/go#hdr-Build_constraints:

Go versions 1.16 and earlier used a different syntax for build constraints, with a "// +build" prefix. The gofmt command will add an equivalent //go:build constraint when encountering the older syntax.

@alexandear alexandear force-pushed the chore-redundant-build-tags branch 2 times, most recently from 97c5b1c to b9c66fe Compare March 11, 2025 11:10
@alexandear alexandear force-pushed the chore-redundant-build-tags branch from b9c66fe to 4547b5b Compare March 11, 2025 11:11
@coveralls
Copy link

coveralls commented Mar 11, 2025

Coverage Status

coverage: 56.319%. remained the same
when pulling 4547b5b on alexandear:chore-redundant-build-tags
into 36d17ba on golang-migrate:master.

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

Successfully merging this pull request may close these issues.

2 participants