|
1 | | -# This file contains all available configuration options |
2 | | -# with their default values. |
3 | | - |
4 | | -# options for analysis running |
| 1 | +version: "2" |
5 | 2 | run: |
6 | | - # default concurrency is a available CPU number |
7 | 3 | concurrency: 16 |
8 | | - |
9 | | - # timeout for analysis, e.g. 30s, 5m, default is 1m |
10 | | - timeout: 5m |
11 | | - |
12 | | - # exit code when at least one issue was found, default is 1 |
13 | 4 | issues-exit-code: 1 |
14 | | - |
15 | | - # include test files or not, default is true |
16 | 5 | tests: true |
17 | | - |
18 | | - # list of build tags, all linters use it. Default is empty list. |
19 | | - build-tags: |
20 | | - |
21 | | - # which dirs to skip: they won't be analyzed; |
22 | | - # can use regexp here: generated.*, regexp is applied on full path; |
23 | | - # default value is empty list, but next dirs are always skipped independently |
24 | | - # from this option's value: |
25 | | - # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ |
26 | | - skip-dirs: |
27 | | - - win_eventlog$ |
28 | | - # which files to skip: they will be analyzed, but issues from them |
29 | | - # won't be reported. Default value is empty list, but there is |
30 | | - # no need to include all autogenerated files, we confidently recognize |
31 | | - # autogenerated files. If it's not please let us know. |
32 | | - skip-files: |
33 | | - # exclude autogenerated files |
34 | | - - pkg/ingester/checkpoint.pb.go |
35 | | - - pkg/logproto/logproto.pb.go |
36 | | - - pkg/logql/expr.y.go |
37 | | - - pkg/logql/log/jsonexpr/jsonexpr.y.go |
38 | | - - pkg/logql/stats/stats.pb.go |
39 | | - - pkg/querier/queryrange/queryrange.pb.go |
40 | | - - pkg/valitail/server/ui/assets_vfsdata.go |
41 | | -# output configuration options |
42 | 6 | output: |
43 | | - # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" |
44 | | - format: colored-line-number |
45 | | - |
46 | | - # print lines of code with issue, default is true |
47 | | - print-issued-lines: true |
48 | | - |
49 | | - # print linter name in the end of issue text, default is true |
50 | | - print-linter-name: true |
51 | | - |
52 | | -linters-settings: |
53 | | - goimports: |
54 | | - local-prefixes: github.com/credativ/vali/pkg |
55 | | - |
| 7 | + formats: |
| 8 | + text: |
| 9 | + path: stdout |
| 10 | + print-linter-name: true |
| 11 | + print-issued-lines: true |
56 | 12 | linters: |
57 | 13 | enable: |
58 | | - - errcheck |
59 | 14 | - goconst |
60 | | - - gofmt |
61 | | - - goimports |
62 | | - - gosimple |
63 | | - - ineffassign |
64 | | - - megacheck |
65 | 15 | - misspell |
66 | 16 | - unconvert |
67 | 17 | - unparam |
68 | | - - govet |
69 | | - - unused # new from here. |
70 | | - - typecheck |
71 | | - |
72 | | -issues: |
73 | | - exclude: |
74 | | - - Error return value of .*log\.Logger\)\.Log\x60 is not checked |
75 | | - - Error return value of .*.Log.* is not checked |
76 | | - - '"io/ioutil" has been deprecated' |
77 | | - - rand.Seed has been deprecated |
| 18 | + exclusions: |
| 19 | + generated: lax |
| 20 | + presets: |
| 21 | + - comments |
| 22 | + - common-false-positives |
| 23 | + - legacy |
| 24 | + - std-error-handling |
| 25 | + rules: |
| 26 | + - path: (.+)\.go$ |
| 27 | + text: Error return value of .*log\.Logger\)\.Log\x60 is not checked |
| 28 | + - path: (.+)\.go$ |
| 29 | + text: Error return value of .*.Log.* is not checked |
| 30 | + - path: (.+)\.go$ |
| 31 | + text: '"io/ioutil" has been deprecated' |
| 32 | + - path: (.+)\.go$ |
| 33 | + text: rand.Seed has been deprecated |
| 34 | + paths: |
| 35 | + - pkg/ingester/checkpoint.pb.go |
| 36 | + - pkg/logproto/logproto.pb.go |
| 37 | + - pkg/logql/expr.y.go |
| 38 | + - pkg/logql/log/jsonexpr/jsonexpr.y.go |
| 39 | + - pkg/logql/stats/stats.pb.go |
| 40 | + - pkg/querier/queryrange/queryrange.pb.go |
| 41 | + - pkg/valitail/server/ui/assets_vfsdata.go |
| 42 | + - win_eventlog$ |
| 43 | + - third_party$ |
| 44 | + - builtin$ |
| 45 | + - examples$ |
| 46 | +formatters: |
| 47 | + enable: |
| 48 | + - gofmt |
| 49 | + - goimports |
| 50 | + settings: |
| 51 | + goimports: |
| 52 | + local-prefixes: |
| 53 | + - github.com/credativ/vali/pkg |
| 54 | + exclusions: |
| 55 | + generated: lax |
| 56 | + paths: |
| 57 | + - pkg/ingester/checkpoint.pb.go |
| 58 | + - pkg/logproto/logproto.pb.go |
| 59 | + - pkg/logql/expr.y.go |
| 60 | + - pkg/logql/log/jsonexpr/jsonexpr.y.go |
| 61 | + - pkg/logql/stats/stats.pb.go |
| 62 | + - pkg/querier/queryrange/queryrange.pb.go |
| 63 | + - pkg/valitail/server/ui/assets_vfsdata.go |
| 64 | + - win_eventlog$ |
| 65 | + - third_party$ |
| 66 | + - builtin$ |
| 67 | + - examples$ |
0 commit comments