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: remove deprecated go version properties #2536

Merged
merged 1 commit into from
May 8, 2024

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented May 7, 2024

Currently, the Go version for some linters is configured via separate properties. This has been deprecated in favor of the global config property run.go and results in the following warning.

% golangci-lint
WARN [config_reader] The configuration option `linters.staticcheck.go` is deprecated, please use global `run.go`.
WARN [config_reader] The configuration option `linters.gosimple.go` is deprecated, please use global `run.go`.
...

In addition, the new property run.go defaults to the Go version defined in the go.mod file.

Therefore, remove the deprecated properties completely and depend on the fallback mechanism (go.mod).

Currently, the Go version for some linters is configured via separate
properties. This has been deprecated in favor of the global config
property `run.go` and results in the following warning.

    % golangci-lint
    WARN [config_reader] The configuration option `linters.staticcheck.go` is deprecated, please use global `run.go`.
    WARN [config_reader] The configuration option `linters.gosimple.go` is deprecated, please use global `run.go`.
    ...

In addition, the new property `run.go` defaults to the Go version
defined in the `go.mod` file.

Therefore, remove the deprecated properties completely and depend on
the fallback mechanism (`go.mod`).

Signed-off-by: Tobias Klauser <[email protected]>
@tklauser tklauser requested a review from a team as a code owner May 7, 2024 14:45
@tklauser tklauser requested a review from derailed May 7, 2024 14:45
Copy link
Contributor

@derailed derailed left a comment

Choose a reason for hiding this comment

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

@tklauser LGTM

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 7, 2024
@tklauser tklauser merged commit 0822e66 into main May 8, 2024
12 of 13 checks passed
@tklauser tklauser deleted the pr/tklauser/lint-go-version branch May 8, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants