You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-38Lines changed: 39 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -185,16 +185,16 @@ GolangCI-Lint can be used with zero configuration. By default the following lint
185
185
```bash
186
186
$ golangci-lint help linters
187
187
Enabled by default linters:
188
-
govet (vet, vetshadow): Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: true]
189
-
errcheck: Errcheck is a program forchecking for unchecked errorsin go programs. These unchecked errors can be critical bugs in some cases [fast: true]
190
-
staticcheck: Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false]
191
-
unused: Checks Go code for unused constants, variables, functions and types [fast: false]
192
-
gosimple: Linter forGo source code that specializesin simplifying a code [fast: false]
193
-
structcheck: Finds an unused struct fields [fast: true]
194
-
varcheck: Finds unused global variables and constants [fast: true]
195
-
ineffassign: Detects when assignments to existing variables are not used [fast: true]
196
-
deadcode: Finds unused code [fast: true]
197
-
typecheck: Like the front-end of a Go compiler, parses and type-checks Go code [fast: true]
188
+
govet (vet, vetshadow): Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: true, auto-fix: false]
189
+
errcheck: Errcheck is a program forchecking for unchecked errorsin go programs. These unchecked errors can be critical bugs in some cases [fast: true, auto-fix: false]
190
+
staticcheck: Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false, auto-fix: false]
191
+
unused: Checks Go code for unused constants, variables, functions and types [fast: false, auto-fix: false]
192
+
gosimple: Linter forGo source code that specializesin simplifying a code [fast: false, auto-fix: false]
193
+
structcheck: Finds an unused struct fields [fast: true, auto-fix: false]
194
+
varcheck: Finds unused global variables and constants [fast: true, auto-fix: false]
195
+
ineffassign: Detects when assignments to existing variables are not used [fast: true, auto-fix: false]
gocritic: The most opinionated Go source code linter [fast: true, auto-fix: false]
225
+
gochecknoinits: Checks that no init functions are present in Go code [fast: true, auto-fix: false]
226
+
gochecknoglobals: Checks that no globals are present in Go code [fast: true, auto-fix: false]
227
227
```
228
228
229
229
Pass `-E/--enable` to enable linter and `-D/--disable` to disable:
@@ -499,6 +499,7 @@ Flags:
499
499
For CI setups, prefer --new-from-rev=HEAD~, as --new can skip linting the current patch if any scripts generate unstaged files before golangci-lint runs.
500
500
--new-from-rev REV Show only new issues created after git revision REV
501
501
--new-from-patch PATH Show only new issues created in git patch with file path PATH
502
+
--fix Fix found issues (if it's supported by the linter)
0 commit comments