Skip to content

Commit 505ed3c

Browse files
authored
doc: Un-deprecate enable-all option. (#2039)
1 parent da91922 commit 505ed3c

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

.golangci.example.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -622,13 +622,14 @@ linters-settings:
622622
original-url: github.com/golangci/example-linter
623623

624624
linters:
625+
disable-all: true
625626
enable:
626627
- megacheck
627628
- govet
629+
enable-all: true
628630
disable:
629631
- maligned
630632
- prealloc
631-
disable-all: false
632633
presets:
633634
- bugs
634635
- unused

.golangci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ linters-settings:
6161
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
6262

6363
linters:
64-
# please, do not use `enable-all`: it's deprecated and will be removed soon.
65-
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
6664
disable-all: true
6765
enable:
6866
- bodyclose

docs/src/docs/usage/install/index.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Also, the action creates GitHub annotations for found issues: you don't need to
1818

1919
### Other CI
2020

21-
It's important to have reproducible CI:
22-
don't start to fail all builds at the same time. With golangci-lint this can happen if you
23-
use deprecated option `--enable-all` and a new linter is added or even without `--enable-all`: when one upstream linter is upgraded.
21+
It's important to have reproducible CI: don't start to fail all builds at the same time.
22+
With golangci-lint this can happen if you use option `--enable-all` and a new linter is added
23+
or even without `--enable-all` when one upstream linter is upgraded.
2424

25-
It's highly recommended to install a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases).
25+
**IMPORTANT**: It's highly recommended installing a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases).
2626

2727
Here is the recommended way to install golangci-lint {.LatestVersion}:
2828

pkg/commands/run.go

-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ func initFlagSet(fs *pflag.FlagSet, cfg *config.Config, m *lintersdb.Manager, is
203203
if err := fs.MarkHidden("enable-all"); err != nil {
204204
panic(err)
205205
}
206-
// TODO: run hideFlag("enable-all") to print deprecation message.
207206

208207
fs.BoolVar(&lc.DisableAll, "disable-all", false, wh("Disable all linters"))
209208
fs.StringSliceVarP(&lc.Presets, "presets", "p", nil,

0 commit comments

Comments
 (0)