| Abhay Kumar | a2ae599 | 2025-11-10 14:02:24 +0000 | [diff] [blame^] | 1 | # yaml-language-server: $schema=https://golangci-lint.run/jsonschema/golangci.jsonschema.json |
| 2 | version: "2" |
| 3 | linters: |
| 4 | default: none |
| 5 | enable: |
| 6 | - bodyclose |
| 7 | - copyloopvar |
| 8 | - depguard |
| 9 | - dogsled |
| 10 | - errcheck |
| 11 | - errorlint |
| 12 | - funlen |
| 13 | - gochecknoinits |
| 14 | - gocritic |
| 15 | - gocyclo |
| 16 | - gosec |
| 17 | - govet |
| 18 | - misspell |
| 19 | - nilerr |
| 20 | - unconvert |
| 21 | - unused |
| 22 | - whitespace |
| 23 | settings: |
| 24 | depguard: |
| 25 | rules: |
| 26 | main: |
| 27 | deny: |
| 28 | - pkg: io/ioutil |
| 29 | desc: Use the "io" and "os" packages instead. |
| 30 | dupl: |
| 31 | threshold: 100 |
| 32 | funlen: |
| 33 | lines: 300 |
| 34 | statements: 300 |
| 35 | goconst: |
| 36 | min-len: 2 |
| 37 | min-occurrences: 3 |
| 38 | gocritic: |
| 39 | enabled-checks: |
| 40 | - importShadow |
| 41 | - nestingReduce |
| 42 | - stringsCompare |
| 43 | # - unnamedResult |
| 44 | # - whyNoLint |
| 45 | disabled-checks: |
| 46 | - assignOp |
| 47 | - appendAssign |
| 48 | - commentedOutCode |
| 49 | - hugeParam |
| 50 | - ifElseChain |
| 51 | - singleCaseSwitch |
| 52 | - sloppyReassign |
| 53 | enabled-tags: |
| 54 | - diagnostic |
| 55 | - performance |
| 56 | # - experimental |
| 57 | # - opinionated |
| 58 | # - style |
| 59 | gocyclo: |
| 60 | min-complexity: 99 |
| 61 | govet: |
| 62 | disable: |
| 63 | - fieldalignment |
| 64 | - shadow |
| 65 | enable-all: true |
| 66 | misspell: |
| 67 | locale: US |
| 68 | # exclude some linters from running on certains files. |
| 69 | exclusions: |
| 70 | generated: lax |
| 71 | presets: |
| 72 | - comments |
| 73 | - common-false-positives |
| 74 | - legacy |
| 75 | - std-error-handling |
| 76 | rules: |
| 77 | - linters: |
| 78 | - paralleltest |
| 79 | path: functional.*_test\.go |
| 80 | - path: (.+)\.go$ |
| 81 | text: 'G115: integer overflow conversion' |
| 82 | - path: (.+)\.go$ |
| 83 | text: 'G404: Use of weak random number generator' |
| 84 | paths: |
| 85 | - third_party$ |
| 86 | - builtin$ |
| 87 | - examples$ |
| 88 | issues: |
| 89 | # maximum count of issues with the same text. set to 0 for unlimited. default is 3. |
| 90 | max-same-issues: 0 |
| 91 | formatters: |
| 92 | enable: |
| 93 | - gofmt |
| 94 | - goimports |
| 95 | settings: |
| 96 | goimports: |
| 97 | local-prefixes: |
| 98 | - github.com/IBM/sarama |
| 99 | exclusions: |
| 100 | generated: lax |
| 101 | paths: |
| 102 | - third_party$ |
| 103 | - builtin$ |
| 104 | - examples$ |