|
7 | 7 |
|
8 | 8 | linters:
|
9 | 9 | enable:
|
10 |
| - - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true] |
11 |
| - - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports [fast: true, auto-fix: true] |
12 |
| - - gosec # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: true, auto-fix: false] |
13 |
| - - misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true] |
14 |
| - - deadcode # Finds unused code [fast: true, auto-fix: false] |
15 |
| - - revive # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: true, auto-fix: false] |
16 |
| - - unconvert # Remove unnecessary type conversions [fast: true, auto-fix: false] |
17 |
| - |
18 |
| - disable: |
19 |
| - # TODO(ross): fix errors reported by these checkers and enable them |
20 | 10 | - bodyclose # checks whether HTTP response body is closed successfully [fast: false, auto-fix: false]
|
21 | 11 | - depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false]
|
22 |
| - - dupl # Tool for code clone detection [fast: true, auto-fix: false] |
23 | 12 | - errcheck # Inspects source code for security problems [fast: true, auto-fix: false]
|
24 |
| - - gochecknoglobals # Checks that no globals are present in Go code [fast: true, auto-fix: false] |
25 |
| - - gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false] |
26 |
| - - goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false] |
27 | 13 | - gocritic # The most opinionated Go source code linter [fast: true, auto-fix: false]
|
28 | 14 | - gocyclo # Computes and checks the cyclomatic complexity of functions [fast: true, auto-fix: false]
|
| 15 | + - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true] |
| 16 | + - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports [fast: true, auto-fix: true] |
| 17 | + - gosec # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: true, auto-fix: false] |
29 | 18 | - gosimple # Linter for Go source code that specializes in simplifying a code [fast: false, auto-fix: false]
|
30 | 19 | - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: false, auto-fix: false]
|
31 | 20 | - ineffassign # Detects when assignments to existing variables are not used [fast: true, auto-fix: false]
|
32 |
| - - interfacer # Linter that suggests narrower interface types [fast: false, auto-fix: false] |
33 |
| - - lll # Reports long lines [fast: true, auto-fix: false] |
34 |
| - - maligned # Tool to detect Go structs that would take less memory if their fields were sorted [fast: true, auto-fix: false] |
| 21 | + - misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true] |
35 | 22 | - nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false]
|
36 | 23 | - prealloc # Finds slice declarations that could potentially be preallocated [fast: true, auto-fix: false]
|
37 |
| - - scopelint # Scopelint checks for unpinned variables in go programs [fast: true, auto-fix: false] |
| 24 | + - revive # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: true, auto-fix: false] |
38 | 25 | - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false, auto-fix: false]
|
39 |
| - - structcheck # Finds unused struct fields [fast: true, auto-fix: false] |
40 | 26 | - stylecheck # Stylecheck is a replacement for golint [fast: false, auto-fix: false]
|
41 | 27 | - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code [fast: true, auto-fix: false]
|
| 28 | + - unconvert # Remove unnecessary type conversions [fast: true, auto-fix: false] |
42 | 29 | - unparam # Reports unused function parameters [fast: false, auto-fix: false]
|
43 | 30 | - unused # Checks Go code for unused constants, variables, functions and types [fast: false, auto-fix: false]
|
44 |
| - - varcheck # Finds unused global variables and constants [fast: true, auto-fix: false] |
| 31 | + |
| 32 | + disable: |
| 33 | + # TODO(ross): fix errors reported by these checkers and enable them |
| 34 | + - dupl # Tool for code clone detection [fast: true, auto-fix: false] |
| 35 | + - gochecknoglobals # Checks that no globals are present in Go code [fast: true, auto-fix: false] |
| 36 | + - gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false] |
| 37 | + - goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false] |
| 38 | + - lll # Reports long lines [fast: true, auto-fix: false] |
45 | 39 | linters-settings:
|
46 | 40 | goimports:
|
47 | 41 | local-prefixes: github.com/crewjam/saml
|
|
0 commit comments