|
| 1 | +version: "2" |
| 2 | +run: |
| 3 | + issues-exit-code: 1 |
| 4 | + tests: true |
| 5 | +output: |
| 6 | + formats: |
| 7 | + text: |
| 8 | + checkstyle: |
| 9 | + path: report.xml |
| 10 | + path-prefix: "" |
1 | 11 | linters:
|
2 |
| - disable-all: true |
| 12 | + default: none |
3 | 13 | enable:
|
4 | 14 | - errcheck
|
5 |
| - - gofmt |
6 | 15 | - revive
|
7 |
| - - goimports |
8 |
| - |
9 |
| -linters-settings: |
10 |
| - errcheck: |
11 |
| - check-type-assertions: true |
12 |
| - check-blank: true |
13 |
| - gofmt: |
14 |
| - simplify: true |
15 |
| - goimports: |
16 |
| - local-prefixes: github.com/obalunenko/advent-of-code/ |
17 |
| - revive: |
18 |
| - # see https://github.com/mgechev/revive#available-rules for details. |
19 |
| - ignore-generated-header: true |
20 |
| - severity: warning |
21 |
| - rules: |
22 |
| - - name: indent-error-flow |
23 |
| - severity: warning |
24 |
| - - name: exported |
25 |
| - severity: warning |
26 |
| - - name: defer |
27 |
| - severity: warning |
28 |
| - arguments: [ [ "call-chain", "loop", "method-call", "recover", "return" ] ] |
29 |
| - |
30 |
| -issues: |
31 |
| - exclude-files: |
32 |
| - - \.pb\.go$ |
33 |
| - exclude-dirs: |
34 |
| - - vendor |
35 |
| - exclude-use-default: false |
36 |
| - exclude: |
37 |
| - # for "public interface + private struct implementation" cases only! |
38 |
| - - exported func * returns unexported type *, which can be annoying to use |
39 |
| - - should have a package comment, unless it's in another file for this package |
40 |
| - # Excluding configuration per-path, per-linter, per-text and per-source |
41 |
| - exclude-rules: |
42 |
| - # Exclude some linters from running on tests files. |
43 |
| - - path: _test\.go |
44 |
| - linters: |
45 |
| - - gocyclo |
46 |
| - - funlen |
47 |
| - - dupl |
48 |
| - - gosec |
49 |
| - - path: internal/input/ |
50 |
| - linters: |
51 |
| - - gocyclo |
52 |
| - - funlen |
53 |
| - - godot |
54 |
| - - godox |
55 |
| - - dupl |
56 |
| - - gofmt |
57 |
| - - gci |
58 |
| - - gofumpt |
59 |
| - - goimports |
60 |
| - - gosimple |
61 |
| - - path: internal/puzzles/constants.go |
62 |
| - linters: |
63 |
| - - revive |
64 |
| - |
65 |
| - # Show only new issues: if there are unstaged changes or untracked files, |
66 |
| - # only those changes are analyzed, else only changes in HEAD~ are analyzed. |
67 |
| - # It's a super-useful option for integration of golangci-lint into existing |
68 |
| - # large codebase. It's not practical to fix all existing issues at the moment |
69 |
| - # of integration: much better don't allow issues in new code. |
70 |
| - # Default is false. |
71 |
| - new: true |
72 |
| - |
73 |
| - # Fix found issues (if it's supported by the linter) |
74 |
| - fix: false |
75 |
| - |
76 |
| - severity: |
77 |
| - # Default value is empty string. |
78 |
| - # Set the default severity for issues. If severity rules are defined and the issues |
79 |
| - # do not match or no severity is provided to the rule this will be the default |
80 |
| - # severity applied. Severities should match the supported severity names of the |
81 |
| - # selected out format. |
82 |
| - # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity |
83 |
| - # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity |
84 |
| - # - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message |
85 |
| - default-severity: error |
86 |
| - |
87 |
| - # The default value is false. |
88 |
| - # If set to true severity-rules regular expressions become case sensitive. |
89 |
| - case-sensitive: false |
90 |
| - |
91 |
| - # Default value is empty list. |
92 |
| - # When a list of severity rules are provided, severity information will be added to lint |
93 |
| - # issues. Severity rules have the same filtering capability as exclude rules except you |
94 |
| - # are allowed to specify one matcher per severity rule. |
95 |
| - # Only affects out formats that support setting severity information. |
| 16 | + - staticcheck |
| 17 | + - unused |
| 18 | + settings: |
| 19 | + errcheck: |
| 20 | + check-type-assertions: true |
| 21 | + check-blank: true |
| 22 | + revive: |
| 23 | + severity: warning |
| 24 | + rules: |
| 25 | + - name: indent-error-flow |
| 26 | + severity: warning |
| 27 | + - name: exported |
| 28 | + severity: warning |
| 29 | + - name: defer |
| 30 | + arguments: |
| 31 | + - - call-chain |
| 32 | + - loop |
| 33 | + - method-call |
| 34 | + - recover |
| 35 | + - return |
| 36 | + severity: warning |
| 37 | + exclusions: |
| 38 | + generated: lax |
96 | 39 | rules:
|
97 | 40 | - linters:
|
98 | 41 | - dupl
|
99 |
| - severity: warning |
100 |
| - |
101 |
| -run: |
102 |
| - issues-exit-code: 1 |
103 |
| - tests: true |
104 |
| - |
105 |
| -# output configuration options |
106 |
| -output: |
107 |
| - # colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions |
108 |
| - # default is "colored-line-number" |
109 |
| - formats: |
110 |
| - - format: colored-line-number |
111 |
| - path: stderr |
112 |
| - - format: checkstyle |
113 |
| - path: linters-report.xml |
114 |
| - |
115 |
| - # print lines of code with issue, default is true |
116 |
| - print-issued-lines: true |
117 |
| - |
118 |
| - # print linter name in the end of issue text, default is true |
119 |
| - print-linter-name: true |
120 |
| - |
121 |
| - # make issues output unique by line, default is true |
| 42 | + - funlen |
| 43 | + - gocyclo |
| 44 | + - gosec |
| 45 | + path: _test\.go |
| 46 | + - linters: |
| 47 | + - dupl |
| 48 | + - funlen |
| 49 | + - gocyclo |
| 50 | + - godot |
| 51 | + - godox |
| 52 | + - staticcheck |
| 53 | + path: internal/input/ |
| 54 | + - linters: |
| 55 | + - revive |
| 56 | + path: internal/puzzles/constants.go |
| 57 | + - path: (.+)\.go$ |
| 58 | + text: exported func * returns unexported type *, which can be annoying to use |
| 59 | + - path: (.+)\.go$ |
| 60 | + text: should have a package comment, unless it's in another file for this package |
| 61 | + paths: |
| 62 | + - \.pb\.go$ |
| 63 | + - vendor/ |
| 64 | + - third_party$ |
| 65 | + - builtin$ |
| 66 | + - examples$ |
| 67 | +issues: |
122 | 68 | uniq-by-line: true
|
123 |
| - |
124 |
| - # add a prefix to the output file references; default is no prefix |
125 |
| - path-prefix: "" |
126 |
| - |
127 |
| - # sorts results by: filepath, line and column |
128 |
| - sort-results: true |
129 |
| - |
130 |
| - |
| 69 | + new: true |
| 70 | + fix: false |
| 71 | +severity: |
| 72 | + default: error |
| 73 | + rules: |
| 74 | + - linters: |
| 75 | + - dupl |
| 76 | + severity: warning |
| 77 | +formatters: |
| 78 | + enable: |
| 79 | + - gofmt |
| 80 | + - goimports |
| 81 | + settings: |
| 82 | + gofmt: |
| 83 | + simplify: true |
| 84 | + goimports: |
| 85 | + local-prefixes: |
| 86 | + - github.com/obalunenko/advent-of-code |
| 87 | + exclusions: |
| 88 | + generated: lax |
| 89 | + paths: |
| 90 | + - \.pb\.go$ |
| 91 | + - vendor/ |
| 92 | + - third_party$ |
| 93 | + - builtin$ |
| 94 | + - examples$ |
| 95 | + - internal/input/ |
0 commit comments