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

doc: Un-deprecate enable-all option. #2039

Merged
merged 1 commit into from
Jun 2, 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: 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