fix: include custom linters in enable-all ()

This commit is contained in:
Ludovic Fernandez 2023-06-16 10:00:09 +02:00 committed by GitHub
parent d147d8bf4f
commit 6c7aba67ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 26 deletions
docs/src/docs/contributing

View file

@ -83,8 +83,11 @@ If you're looking for instructions on how to configure your own custom linter, t
That is all the configuration that is required to run a custom linter in your project.
Custom linters are disabled by default, and are not enabled when `linters.enable-all` is specified.
They can be enabled by adding them the `linters.enable` list, or providing the enabled option on the command line (`golangci-lint run -Eexample`).
Custom linters are enabled by default, but abide by the same rules as other linters.
If the disable all option is specified either on command line or in `.golang.yml` files `linters.disable-all: true`, custom linters will be disabled;
they can be re-enabled by adding them to the `linters:enable` list,
or providing the enabled option on the command line, `golangci-lint run -Eexample`.
The configuration inside the `settings` field of linter have some limitations (there are NOT related to the plugin system itself):
we use Viper to handle the configuration but Viper put all the keys in lowercase, and `.` cannot be used inside a key.