v1.60.1+ on Go 1.23 No Longer Excludes Config of main redeclared in this block
#4950
Closed
6 of 7 tasks
main redeclared in this block
#4950
Welcome
typecheck
section of the FAQ.Description of the problem
We have a repo of example snippets on using our API. The Go code lived alongside each other and all were runnable out of the box. We did have many snippets redeclaring the
main
block for that reason. We were able to get around this because they serve as a reference and aren't meant to be a module. We usegolangci-lint
and simply ignored those via our config (listed below). When we upgraded fromGo 1.22
toGo 1.23
andgolangci-lint 1.59.1
togolangci-lint 1.60.1
, the tool no longer respects our config where we excluded the two rules that are now giving us grief:"other declaration of main"
and"redeclared in this block"
. Prior to the upgrades, the linter ignored these lint issues and our linting passed. After the updates, linting fails.Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
PR that failed here: EasyPost/examples#158
Validation
Supporter
The text was updated successfully, but these errors were encountered: