|
5 | 5 | issues-exit-code: 1 |
6 | 6 | tests: true |
7 | 7 | # list of build tags, all linters use it. Default is empty list. |
8 | | - build-tags: testing |
9 | | - |
10 | | - # which dirs to skip: issues from them won't be reported; |
11 | | - # can use regexp here: generated.*, regexp is applied on full path; |
12 | | - # default value is empty list, but default dirs are skipped independently |
13 | | - # from this option's value (see skip-dirs-use-default). |
14 | | - skip-dirs: [] |
15 | | - |
16 | | - # default is true. Enables skipping of directories: |
17 | | - # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ |
18 | | - skip-dirs-use-default: true |
19 | | - |
20 | | - # which files to skip: they will be analyzed, but issues from them |
21 | | - # won't be reported. Default value is empty list, but there is |
22 | | - # no need to include all autogenerated files, we confidently recognize |
23 | | - # autogenerated files. If it's not please let us know. |
24 | | - skip-files: [] |
| 8 | + build-tags: ['testing'] |
25 | 9 |
|
26 | 10 | # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules": |
27 | 11 | # If invoked with -mod=readonly, the go command is disallowed from the implicit |
|
35 | 19 |
|
36 | 20 | # output configuration options |
37 | 21 | output: |
38 | | - # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" |
39 | | - format: colored-line-number |
40 | | - |
41 | 22 | # print lines of code with issue, default is true |
42 | 23 | print-issued-lines: true |
43 | 24 |
|
44 | 25 | # print linter name in the end of issue text, default is true |
45 | 26 | print-linter-name: true |
46 | 27 |
|
47 | | - # make issues output unique by line, default is true |
48 | | - uniq-by-line: true |
49 | 28 |
|
50 | 29 | #It's a .golangci.yml config file of this repo: we enable more linters than the default and have more strict settings: |
51 | 30 |
|
@@ -75,13 +54,7 @@ linters-settings: |
75 | 54 | min-complexity: 15 |
76 | 55 | goimports: |
77 | 56 | local-prefixes: github.com/golangci/golangci-lint |
78 | | - gomnd: |
79 | | - settings: |
80 | | - mnd: |
81 | | - # don't include the "operation" and "assign" |
82 | | - checks: argument,case,condition,return |
83 | 57 | govet: |
84 | | - check-shadowing: true |
85 | 58 | settings: |
86 | 59 | printf: |
87 | 60 | funcs: |
@@ -181,7 +154,3 @@ issues: |
181 | 154 | - funlen |
182 | 155 | - cyclop |
183 | 156 |
|
184 | | -# golangci.com configuration |
185 | | -# https://github.com/golangci/golangci/wiki/Configuration |
186 | | -service: |
187 | | - golangci-lint-version: 1.51.x # use the fixed version to not introduce new linters unexpectedly |
0 commit comments