doc: Un-deprecate enable-all option. (#2039)
This commit is contained in:
parent
da919227b4
commit
505ed3c0f7
@ -622,13 +622,14 @@ linters-settings:
|
|||||||
original-url: github.com/golangci/example-linter
|
original-url: github.com/golangci/example-linter
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
|
disable-all: true
|
||||||
enable:
|
enable:
|
||||||
- megacheck
|
- megacheck
|
||||||
- govet
|
- govet
|
||||||
|
enable-all: true
|
||||||
disable:
|
disable:
|
||||||
- maligned
|
- maligned
|
||||||
- prealloc
|
- prealloc
|
||||||
disable-all: false
|
|
||||||
presets:
|
presets:
|
||||||
- bugs
|
- bugs
|
||||||
- unused
|
- unused
|
||||||
|
@ -61,8 +61,6 @@ linters-settings:
|
|||||||
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
|
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
|
||||||
|
|
||||||
linters:
|
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
|
disable-all: true
|
||||||
enable:
|
enable:
|
||||||
- bodyclose
|
- bodyclose
|
||||||
|
@ -18,11 +18,11 @@ Also, the action creates GitHub annotations for found issues: you don't need to
|
|||||||
|
|
||||||
### Other CI
|
### Other CI
|
||||||
|
|
||||||
It's important to have reproducible CI:
|
It's important to have reproducible CI: don't start to fail all builds at the same time.
|
||||||
don't start to fail all builds at the same time. With golangci-lint this can happen if you
|
With golangci-lint this can happen if you use option `--enable-all` and a new linter is added
|
||||||
use deprecated option `--enable-all` and a new linter is added or even without `--enable-all`: when one upstream linter is upgraded.
|
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}:
|
Here is the recommended way to install golangci-lint {.LatestVersion}:
|
||||||
|
|
||||||
|
@ -203,7 +203,6 @@ func initFlagSet(fs *pflag.FlagSet, cfg *config.Config, m *lintersdb.Manager, is
|
|||||||
if err := fs.MarkHidden("enable-all"); err != nil {
|
if err := fs.MarkHidden("enable-all"); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
// TODO: run hideFlag("enable-all") to print deprecation message.
|
|
||||||
|
|
||||||
fs.BoolVar(&lc.DisableAll, "disable-all", false, wh("Disable all linters"))
|
fs.BoolVar(&lc.DisableAll, "disable-all", false, wh("Disable all linters"))
|
||||||
fs.StringSliceVarP(&lc.Presets, "presets", "p", nil,
|
fs.StringSliceVarP(&lc.Presets, "presets", "p", nil,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user