|
11 | 11 | linters:
|
12 | 12 | enable:
|
13 | 13 | #- bodyclose # checks whether HTTP response body is closed successfully
|
14 |
| - #- dupl # Tool for code clone detection |
| 14 | + - dupl # Tool for code clone detection |
15 | 15 | - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
|
16 |
| - #- goconst # Finds repeated strings that could be replaced by a constant |
| 16 | + # - goconst # Finds repeated strings that could be replaced by a constant |
17 | 17 | #- gocritic # The most opinionated Go source code linter
|
18 | 18 | - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
|
19 | 19 | #- goprintffuncname # Checks that printf-like functions are named with `f` at the end
|
20 | 20 | #- gosec # (gas) Inspects source code for security problems
|
21 | 21 | #- gosimple # (megacheck) Linter for Go source code that specializes in simplifying a code
|
22 | 22 | - 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
|
23 | 23 | - ineffassign # Detects when assignments to existing variables are not used
|
24 |
| - #- nakedret # Finds naked returns in functions greater than a specified function length |
25 |
| - #- prealloc # Finds slice declarations that could potentially be preallocated |
| 24 | + - misspell # Finds commonly misspelled English words in comments |
| 25 | + - nakedret # Finds naked returns in functions greater than a specified function length |
| 26 | + - prealloc # Finds slice declarations that could potentially be preallocated |
26 | 27 | #- revive # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
|
27 | 28 | - staticcheck # (megacheck) Staticcheck is a go vet on steroids, applying a ton of static analysis checks
|
28 |
| - #- structcheck # Finds unused struct fields |
29 | 29 | - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
|
30 | 30 | #- unconvert # Remove unnecessary type conversions
|
31 |
| - #- unparam # Reports unused function parameters |
| 31 | + - unparam # Reports unused function parameters |
32 | 32 | #- unused # (megacheck) Checks Go code for unused constants, variables, functions and types
|
33 | 33 | disable:
|
34 |
| - - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers |
35 |
| - - depguard # Go linter that checks if package imports are in a list of acceptable packages |
36 |
| - - dogsled # Checks assignments with too many blank identifiers # (e.g. x, _, _, _, := f()) |
37 |
| - - funlen # Tool for detection of long functions |
38 |
| - - gochecknoglobals # Checks that no globals are present in Go code |
39 |
| - - gochecknoinits # Checks that no init functions are present in Go code |
40 |
| - - gocognit # Computes and checks the cognitive complexity of functions |
41 |
| - - gocyclo # Computes and checks the cyclomatic complexity of functions |
42 |
| - - godot # Check if comments end in a period |
43 |
| - - godox # Tool for detection of FIXME, TODO and other comment keywords |
44 |
| - - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification |
45 |
| - - gomnd # An analyzer to detect magic numbers. |
46 |
| - - gomodguard # Allow and block list linter for direct Go module dependencies. |
47 |
| - - lll # Reports long lines |
48 |
| - - misspell # Finds commonly misspelled English words in comments |
49 |
| - - nestif # Reports deeply nested if statements |
50 |
| - - nolintlint # Reports ill-formed or insufficient nolint directives |
51 |
| - - rowserrcheck # checks whether Err of rows is checked successfully |
52 |
| - - stylecheck # Stylecheck is a replacement for golint |
53 |
| - - testpackage # linter that makes you use a separate _test package |
54 |
| - - unused # (megacheck) Checks Go code for unused constants, variables, functions and types |
55 |
| - - whitespace # Tool for detection of leading and trailing whitespace |
56 |
| - - wsl # Whitespace Linter - Forces you to use empty lines! |
57 |
| - # Once fixed, should enable |
58 |
| - - bodyclose # checks whether HTTP response body is closed successfully |
59 |
| - - dupl # Tool for code clone detection |
60 |
| - - goconst # Finds repeated strings that could be replaced by a constant |
61 |
| - - gocritic # The most opinionated Go source code linter |
62 |
| - - goprintffuncname # Checks that printf-like functions are named with `f` at the end |
63 |
| - - gosec # (gas) Inspects source code for security problems |
64 | 34 | - gosimple # (megacheck) Linter for Go source code that specializes in simplifying a code
|
65 |
| - - nakedret # Finds naked returns in functions greater than a specified function length |
66 |
| - - prealloc # Finds slice declarations that could potentially be preallocated |
67 |
| - - revive # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes |
68 |
| - - unconvert # Remove unnecessary type conversions |
69 |
| - - unparam # Reports unused function parameters |
| 35 | + - unused # (megacheck) Checks Go code for unused constants, variables, functions and types |
70 | 36 |
|
71 | 37 | # Don't enable fieldalignment, changing the field alignment requires checking to see if anyone uses constructors
|
72 | 38 | # without names. If there is a memory issue on a specific field, that is best found with a heap profile.
|
|
0 commit comments