|
1 | | -# Documentation: <https://github.com/golangci/golangci-lint#config-file> |
2 | | - |
| 1 | +version: "2" |
3 | 2 | run: |
4 | | - timeout: 1m |
5 | 3 | modules-download-mode: readonly |
6 | 4 | allow-parallel-runners: true |
7 | | - |
8 | 5 | output: |
9 | 6 | formats: |
10 | | - - format: colored-line-number |
11 | | - |
12 | | -linters-settings: |
13 | | - revive: |
14 | | - confidence: 0.8 |
15 | | - godot: |
16 | | - scope: declarations |
17 | | - capital: true |
18 | | - dupl: |
19 | | - threshold: 100 |
20 | | - goconst: |
21 | | - min-len: 2 |
22 | | - min-occurrences: 3 |
23 | | - misspell: |
24 | | - locale: US |
25 | | - lll: |
26 | | - line-length: 120 |
27 | | - prealloc: |
28 | | - simple: true |
29 | | - range-loops: true |
30 | | - for-loops: true |
31 | | - nolintlint: |
32 | | - require-specific: true |
33 | | - |
34 | | -linters: # All available linters list: <https://golangci-lint.run/usage/linters/> |
35 | | - disable-all: true |
| 7 | + text: |
| 8 | + path: stdout |
| 9 | +linters: |
| 10 | + default: none |
36 | 11 | enable: |
37 | | - - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers |
38 | | - - bodyclose # Checks whether HTTP response body is closed successfully |
39 | | - - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) |
40 | | - - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases |
41 | | - - exhaustive # check exhaustiveness of enum switch statements |
42 | | - - copyloopvar # Checks for using loop variables in function literal closures |
43 | | - - gochecknoinits # Checks that no init functions are present in Go code |
44 | | - - goconst # Finds repeated strings that could be replaced by a constant |
45 | | - - gocritic # The most opinionated Go source code linter |
46 | | - - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification |
47 | | - - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports |
48 | | - - revive # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes |
49 | | - - goprintffuncname # Checks that printf-like functions are named with `f` at the end |
50 | | - - gosec # Inspects source code for security problems |
51 | | - - gosimple # Linter for Go source code that specializes in simplifying a code |
52 | | - - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string |
53 | | - - ineffassign # Detects when assignments to existing variables are not used |
54 | | - - misspell # Finds commonly misspelled English words in comments |
55 | | - - nakedret # Finds naked returns in functions greater than a specified function length |
56 | | - - noctx # finds sending http request without context.Context |
57 | | - - nolintlint # Reports ill-formed or insufficient nolint directives |
58 | | - - prealloc # Finds slice declarations that could potentially be preallocated |
59 | | - - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks |
60 | | - - stylecheck # Stylecheck is a replacement for golint |
61 | | - - tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes |
62 | | - - unconvert # Remove unnecessary type conversions |
63 | | - - unused # Checks Go code for unused constants, variables, functions and types |
64 | | - - whitespace # Tool for detection of leading and trailing whitespace |
65 | | - |
66 | | -issues: |
67 | | - exclude-dirs: |
68 | | - - .github |
69 | | - - .git |
70 | | - exclude-rules: |
71 | | - - path: _test\.go |
72 | | - linters: |
73 | | - - dupl |
74 | | - - funlen |
75 | | - - scopelint |
76 | | - - gocognit |
77 | | - - goconst |
78 | | - - noctx |
79 | | - - gosimple |
80 | | - - revive |
81 | | - - gochecknoinits |
| 12 | + - asciicheck |
| 13 | + - bodyclose |
| 14 | + - copyloopvar |
| 15 | + - dogsled |
| 16 | + - errcheck |
| 17 | + - exhaustive |
| 18 | + - gochecknoinits |
| 19 | + - goconst |
| 20 | + - gocritic |
| 21 | + - goprintffuncname |
| 22 | + - gosec |
| 23 | + - govet |
| 24 | + - ineffassign |
| 25 | + - misspell |
| 26 | + - nakedret |
| 27 | + - noctx |
| 28 | + - nolintlint |
| 29 | + - prealloc |
| 30 | + - revive |
| 31 | + - staticcheck |
| 32 | + - tparallel |
| 33 | + - unconvert |
| 34 | + - unused |
| 35 | + - whitespace |
| 36 | + settings: |
| 37 | + dupl: |
| 38 | + threshold: 100 |
| 39 | + goconst: |
| 40 | + min-len: 2 |
| 41 | + min-occurrences: 3 |
| 42 | + godot: |
| 43 | + scope: declarations |
| 44 | + capital: true |
| 45 | + lll: |
| 46 | + line-length: 120 |
| 47 | + misspell: |
| 48 | + locale: US |
| 49 | + nolintlint: |
| 50 | + require-specific: true |
| 51 | + prealloc: |
| 52 | + simple: true |
| 53 | + range-loops: true |
| 54 | + for-loops: true |
| 55 | + revive: |
| 56 | + confidence: 0.8 |
| 57 | + exclusions: |
| 58 | + generated: lax |
| 59 | + presets: |
| 60 | + - comments |
| 61 | + - common-false-positives |
| 62 | + - legacy |
| 63 | + - std-error-handling |
| 64 | + rules: |
| 65 | + - linters: |
| 66 | + - dupl |
| 67 | + - funlen |
| 68 | + - gochecknoinits |
| 69 | + - gocognit |
| 70 | + - goconst |
| 71 | + - noctx |
| 72 | + - revive |
| 73 | + - scopelint |
| 74 | + - staticcheck |
| 75 | + path: _test\.go |
| 76 | + paths: |
| 77 | + - .github |
| 78 | + - .git |
| 79 | + - third_party$ |
| 80 | + - builtin$ |
| 81 | + - examples$ |
| 82 | +formatters: |
| 83 | + enable: |
| 84 | + - gofmt |
| 85 | + - goimports |
| 86 | + exclusions: |
| 87 | + generated: lax |
| 88 | + paths: |
| 89 | + - .github |
| 90 | + - .git |
| 91 | + - third_party$ |
| 92 | + - builtin$ |
| 93 | + - examples$ |
0 commit comments