| 1 | # Run on code only in the new commits |
| 2 | new: true |
| 3 | |
| 4 | run: |
| 5 | # Max 1 minute |
| 6 | timeout: 10m |
| 7 | |
| 8 | # Return an exit code of 1 when a linter fails |
| 9 | issues-exit-code: 1 |
| 10 | |
| 11 | # Include test files |
| 12 | tests: true |
| 13 | |
| 14 | # Use the vendored 3rd party libs |
| 15 | #modules-download-mode: release |
| 16 | |
| 17 | # output configuration options |
| 18 | output: |
| 19 | # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" |
| 20 | format: colored-line-number |
| 21 | |
| 22 | # print lines of code with issue, default is true |
| 23 | print-issued-lines: true |
| 24 | |
| 25 | # print linter name in the end of issue text, default is true |
| 26 | print-linter-name: true |
| 27 | |
| 28 | linters: |
| 29 | enable: |
| 30 | - revive |
| 31 | - gosec |
| 32 | - unconvert |
| 33 | - gocyclo |
| 34 | - goimports |
| 35 | - nakedret |
| 36 | - exportloopref |
| 37 | - exhaustive |
| 38 | - exportloopref |
| 39 | |
| 40 | linters-settings: |
| 41 | errcheck: |
| 42 | # report about not checking of errors in type assertions: `a := b.(MyStruct)`; |
| 43 | # default is false: such cases aren't reported by default. |
| 44 | check-type-assertions: true |
| 45 | |
| 46 | exhaustive: |
| 47 | default-signifies-exhaustive: true |
| 48 | # A default case in a switch covers all remaining variants |
| 49 | |
| 50 | issues: |
| 51 | exclude-use-default: false |
| 52 | |
| 53 | exclude-rules: |
| 54 | # Exclude some linters from running on tests files. |
| 55 | - path: (_test\.go) |
| 56 | linters: |
| 57 | - gocyclo |
| 58 | - errcheck |
| 59 | - gosec |
| 60 | |
| 61 | # No need for this - errcheck does it. |
| 62 | - linters: |
| 63 | - gosec |
| 64 | text: "G104: Errors unhandled" |