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
Also do following improvements:
- show proper sublinter name for megacheck sublinters
- refactor and make more simple and robust megacheck
merging/optimizing
- improve handling of unknown linter names in //nolint directives
- minimize diff of our megacheck version from the upstream,
golang/go#29612 blocks usage of the upstream
version
- support the new `stylecheck` linter
- improve tests coverage for megacheck and nolint related cases
- update and use upstream versions of unparam and interfacer instead of forked
ones
- don't use golangci/tools repo anymore
- fix newly found issues after updating linters
Also should be noted that megacheck works much faster and consumes less
memory in the newest release, therefore golangci-lint works noticeably
faster and consumes less memory for large repos.
Relates: #314
Copy file name to clipboardExpand all lines: README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ GolangCI-Lint can be used with zero configuration. By default the following lint
166
166
```bash
167
167
$ golangci-lint help linters
168
168
Enabled by default linters:
169
-
govet: Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: true]
169
+
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]
170
170
errcheck: Errcheck is a program forchecking for unchecked errorsin go programs. These unchecked errors can be critical bugs in some cases [fast: true]
171
171
staticcheck: Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false]
172
172
unused: Checks Go code for unused constants, variables, functions and types [fast: false]
@@ -185,6 +185,7 @@ $ golangci-lint help linters
185
185
...
186
186
Disabled by default linters:
187
187
golint: Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: true]
188
+
stylecheck: Stylecheck is a replacement for golint [fast: false]
188
189
gosec (gas): Inspects source code for security problems [fast: true]
189
190
interfacer: Linter that suggests narrower interface types [fast: false]
190
191
unconvert: Remove unnecessary type conversions [fast: true]
@@ -194,7 +195,6 @@ gocyclo: Computes and checks the cyclomatic complexity of functions [fast: true]
194
195
gofmt: Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true]
195
196
goimports: Goimports does everything that gofmt does. Additionally it checks unused imports [fast: true]
196
197
maligned: Tool to detect Go structs that would take less memory if their fields were sorted [fast: true]
197
-
megacheck: 3 sub-linters in one: unused, gosimple and staticcheck [fast: false]
198
198
depguard: Go linter that checks if package imports are in a list of acceptable packages [fast: true]
199
199
misspell: Finds commonly misspelled English words in comments [fast: true]
200
200
lll: Reports long lines [fast: true]
@@ -388,6 +388,7 @@ golangci-lint help linters
388
388
### Disabled By Default Linters (`-E/--enable`)
389
389
390
390
- [golint](https://github.com/golang/lint) - Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
391
+
- [stylecheck](https://github.com/dominikh/go-tools/tree/master/stylecheck) - Stylecheck is a replacement for golint
391
392
- [gosec](https://github.com/securego/gosec) - Inspects source code for security problems
392
393
- [interfacer](https://github.com/mvdan/interfacer) - Linter that suggests narrower interface types
393
394
- [unconvert](https://github.com/mdempsky/unconvert) - Remove unnecessary type conversions
@@ -397,7 +398,6 @@ golangci-lint help linters
397
398
- [gofmt](https://golang.org/cmd/gofmt/) - Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
398
399
- [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) - Goimports does everything that gofmt does. Additionally it checks unused imports
399
400
- [maligned](https://github.com/mdempsky/maligned) - Tool to detect Go structs that would take less memory if their fields were sorted
400
-
- [megacheck](https://github.com/dominikh/go-tools/tree/master/cmd/megacheck) - 3 sub-linters in one: unused, gosimple and staticcheck
401
401
- [depguard](https://github.com/OpenPeeDeeP/depguard) - Go linter that checks if package imports are in a list of acceptable packages
402
402
- [misspell](https://github.com/client9/misspell) - Finds commonly misspelled English words in comments
403
403
- [lll](https://github.com/walle/lll) - Reports long lines
@@ -461,7 +461,7 @@ Flags:
461
461
# govet: Common false positives
462
462
- (possible misuse of unsafe.Pointer|should have signature)
463
463
464
-
# megacheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
464
+
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
465
465
- ineffective break statement. Did you mean to break out of the outer loop
466
466
467
467
# gosec: Too many false-positives on 'unsafe' usage
0 commit comments