docs: add a section about default exclusions ()

This commit is contained in:
Ludovic Fernandez 2022-08-20 19:05:13 +02:00 committed by GitHub
parent 2b4c9ab4fc
commit d286cb910c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 6 deletions
docs/src/docs

View file

@ -14,7 +14,7 @@ conduct](https://github.com/golangci/golangci-lint/blob/master/CODE_OF_CONDUCT.m
Prerequisites:
- `make`
- [Go 1.13+](https://golang.org/doc/install)
- [Go](https://golang.org/doc/install)
Fork and clone [golangci-lint](https://github.com/golangci/golangci-lint) repository.

View file

@ -142,3 +142,10 @@ func someLegacyFunction() *string {
You can see more examples of using `//nolint` in [our tests](https://github.com/golangci/golangci-lint/tree/master/pkg/result/processors/testdata) for it.
Use `//nolint` instead of `// nolint` because machine-readable comments should have no space by Go convention.
## Default Exclusions
Some exclusions are considered as common, to help golangci-lint users those common exclusions are used as default exclusions.
If you don't want to use it you can set `issues.exclude-use-default` to `false`.
{.DefaultExclusions}