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

Deprecate golint #1965

Merged
merged 3 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ linters-settings:
min-complexity: 15
goimports:
local-prefixes: github.com/golangci/golangci-lint
golint:
min-confidence: 0
gomnd:
settings:
mnd:
Expand Down Expand Up @@ -82,7 +80,6 @@ linters:
- gocyclo
- gofmt
- goimports
- golint
- gomnd
- goprintffuncname
- gosec
Expand Down
3 changes: 2 additions & 1 deletion pkg/lint/lintersdb/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.0.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetStyle).
WithURL("https://github.com/golang/lint"),
WithURL("https://github.com/golang/lint").
Deprecated("The repository of the linter has been archived by the owner.", "v1.41.0", "revive"),
linter.NewConfig(golinters.NewRowsErrCheck()).
WithSince("v1.23.0").
WithLoadForGoAnalysis().
Expand Down
2 changes: 1 addition & 1 deletion test/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func TestTimeoutInConfig(t *testing.T) {

func TestTestsAreLintedByDefault(t *testing.T) {
testshared.NewLintRunner(t).Run(getTestDataDir("withtests")).
ExpectHasIssue("`if` block ends with a `return`")
ExpectHasIssue("don't use `init` function")
}

func TestCgoOk(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/default_exclude.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//args: -Estylecheck,golint
//args: -Estylecheck,golint --internal-cmd-test
//config_path: testdata/configs/default_exclude.yml

/*Package testdata ...*/
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/golint.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//args: -Egolint
//args: -Egolint --internal-cmd-test
package testdata

var Go_lint string // ERROR "don't use underscores in Go names; var `Go_lint` should be `GoLint`"
Expand Down