Skip to content

Commit

Permalink
doc: Un-deprecate enable-all option. (#2039)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jun 2, 2021
1 parent da91922 commit 505ed3c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .golangci.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/src/docs/usage/install/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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}:

Expand Down
1 change: 0 additions & 1 deletion pkg/commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 505ed3c

Please sign in to comment.