|
| 1 | +version: "2" |
1 | 2 | run:
|
2 | 3 | go: "1.23"
|
3 |
| - timeout: 3m |
4 |
| - |
5 |
| -linters-settings: |
6 |
| - cyclop: |
7 |
| - # The maximal code complexity to report. |
8 |
| - # Default: 10 |
9 |
| - max-complexity: 10 |
10 |
| - # The maximal average package complexity. |
11 |
| - # If it's higher than 0.0 (float) the check is enabled |
12 |
| - # Default: 0.0 |
13 |
| - package-average: 10.0 |
14 |
| - |
15 |
| - errcheck: |
16 |
| - # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. |
17 |
| - # Such cases aren't reported by default. |
18 |
| - # Default: false |
19 |
| - check-type-assertions: true |
20 |
| - |
21 |
| - gocritic: |
22 |
| - # Settings passed to gocritic. |
23 |
| - # The settings key is the name of a supported gocritic checker. |
24 |
| - # The list of supported checkers can be find in https://go-critic.github.io/overview. |
25 |
| - settings: |
26 |
| - captLocal: |
27 |
| - # Whether to restrict checker to params only. |
28 |
| - # Default: true |
29 |
| - paramsOnly: false |
30 |
| - underef: |
31 |
| - # Whether to skip (*x).method() calls where x is a pointer receiver. |
32 |
| - # Default: true |
33 |
| - skipRecvDeref: false |
34 |
| - |
35 |
| - revive: |
36 |
| - rules: |
37 |
| - - name: if-return |
38 |
| - disabled: true |
39 |
| - |
40 |
| - - name: unused-parameter |
41 |
| - disabled: true |
42 |
| - |
43 |
| - varcheck: |
44 |
| - # Check usage of exported fields and variables. |
45 |
| - # Default: false |
46 |
| - exported-fields: true |
47 |
| - |
48 | 4 | linters:
|
49 |
| - disable-all: true |
| 5 | + default: none |
50 | 6 | enable:
|
51 |
| - ## enabled by default |
52 |
| - - unused # Finds unused code |
53 |
| - # - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases |
54 |
| - # - gosimple # Linter for Go source code that specializes in simplifying a code |
55 |
| - - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string |
56 |
| - - ineffassign # Detects when assignments to existing variables are not used |
57 |
| - # - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks |
58 |
| - # - structcheck # Finds unused struct fields |
59 |
| - - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code |
60 |
| - # - unused # Checks Go code for unused constants, variables, functions and types |
61 |
| - # - varcheck # Finds unused global variables and constants |
62 |
| - # ## disabled by default |
63 |
| - # - contextcheck # check the function whether use a non-inherited context |
64 |
| - # - cyclop # checks function and package cyclomatic complexity |
65 |
| - # - errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error. |
66 |
| - # - gocritic # Provides diagnostics that check for bugs, performance and style issues. |
67 |
| - # - gocyclo # Computes and checks the cyclomatic complexity of functions |
68 |
| - # - nestif # Reports deeply nested if statements |
69 |
| - - revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. |
70 |
| -# - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed |
71 |
| -# - stylecheck # Stylecheck is a replacement for golint |
72 |
| -# - wastedassign # wastedassign finds wasted assignment statements. |
73 |
| -# - whitespace # Tool for detection of leading and trailing whitespace |
| 7 | + - govet |
| 8 | + - ineffassign |
| 9 | + - revive |
| 10 | + - unused |
| 11 | + settings: |
| 12 | + cyclop: |
| 13 | + max-complexity: 10 |
| 14 | + package-average: 10 |
| 15 | + errcheck: |
| 16 | + check-type-assertions: true |
| 17 | + gocritic: |
| 18 | + settings: |
| 19 | + captLocal: |
| 20 | + paramsOnly: false |
| 21 | + underef: |
| 22 | + skipRecvDeref: false |
| 23 | + revive: |
| 24 | + rules: |
| 25 | + - name: if-return |
| 26 | + disabled: true |
| 27 | + - name: unused-parameter |
| 28 | + disabled: true |
| 29 | + exclusions: |
| 30 | + generated: lax |
| 31 | + presets: |
| 32 | + - comments |
| 33 | + - common-false-positives |
| 34 | + - legacy |
| 35 | + - std-error-handling |
| 36 | + paths: |
| 37 | + - third_party$ |
| 38 | + - builtin$ |
| 39 | + - examples$ |
| 40 | +formatters: |
| 41 | + exclusions: |
| 42 | + generated: lax |
| 43 | + paths: |
| 44 | + - third_party$ |
| 45 | + - builtin$ |
| 46 | + - examples$ |
0 commit comments