mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-10 21:38:44 -04:00
nolint: drop allow-leading-space option and add "nolint:all" (#3002)
This commit is contained in:
parent
39fc81c19c
commit
f8f8f9a6e7
22 changed files with 68 additions and 76 deletions
docs/src/docs/usage
|
@ -95,11 +95,11 @@ run:
|
|||
|
||||
## Nolint Directive
|
||||
|
||||
To exclude issues from all linters use `//nolint`.
|
||||
To exclude issues from all linters use `//nolint:all`.
|
||||
For example, if it's used inline (not from the beginning of the line) it excludes issues only for this line.
|
||||
|
||||
```go
|
||||
var bad_name int //nolint
|
||||
var bad_name int //nolint:all
|
||||
```
|
||||
|
||||
To exclude issues from specific linters only:
|
||||
|
@ -111,7 +111,7 @@ var bad_name int //nolint:golint,unused
|
|||
To exclude issues for the block of code use this directive on the beginning of a line:
|
||||
|
||||
```go
|
||||
//nolint
|
||||
//nolint:all
|
||||
func allIssuesInThisFunctionAreExcluded() *string {
|
||||
// ...
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue