diff --git a/.golangci.example.yml b/.golangci.example.yml index dd9cd92fdf33..303f1f67346c 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -622,13 +622,14 @@ linters-settings: original-url: github.com/golangci/example-linter linters: + disable-all: true enable: - megacheck - govet + enable-all: true disable: - maligned - prealloc - disable-all: false presets: - bugs - unused diff --git a/.golangci.yml b/.golangci.yml index 186eae865ee4..12768450a5c8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -61,8 +61,6 @@ linters-settings: require-specific: false # don't require nolint directives to be specific about which linter is being skipped linters: - # please, do not use `enable-all`: it's deprecated and will be removed soon. - # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint disable-all: true enable: - bodyclose diff --git a/docs/src/docs/usage/install/index.mdx b/docs/src/docs/usage/install/index.mdx index d7927bbe762a..d4d7dd2f5f96 100644 --- a/docs/src/docs/usage/install/index.mdx +++ b/docs/src/docs/usage/install/index.mdx @@ -18,11 +18,11 @@ Also, the action creates GitHub annotations for found issues: you don't need to ### Other CI -It's important to have reproducible CI: -don't start to fail all builds at the same time. With golangci-lint this can happen if you -use deprecated option `--enable-all` and a new linter is added or even without `--enable-all`: when one upstream linter is upgraded. +It's important to have reproducible CI: don't start to fail all builds at the same time. +With golangci-lint this can happen if you use option `--enable-all` and a new linter is added +or even without `--enable-all` when one upstream linter is upgraded. -It's highly recommended to install a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases). +**IMPORTANT**: It's highly recommended installing a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases). Here is the recommended way to install golangci-lint {.LatestVersion}: diff --git a/pkg/commands/run.go b/pkg/commands/run.go index f5421e702eee..31a4e7917187 100644 --- a/pkg/commands/run.go +++ b/pkg/commands/run.go @@ -203,7 +203,6 @@ func initFlagSet(fs *pflag.FlagSet, cfg *config.Config, m *lintersdb.Manager, is if err := fs.MarkHidden("enable-all"); err != nil { panic(err) } - // TODO: run hideFlag("enable-all") to print deprecation message. fs.BoolVar(&lc.DisableAll, "disable-all", false, wh("Disable all linters")) fs.StringSliceVarP(&lc.Presets, "presets", "p", nil,