.golangci.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. run:
  2. timeout: 5m
  3. deadline: 10m
  4. linters-settings:
  5. govet:
  6. check-shadowing: false
  7. golint:
  8. min-confidence: 0
  9. gocyclo:
  10. min-complexity: 99
  11. maligned:
  12. suggest-new: true
  13. dupl:
  14. threshold: 100
  15. goconst:
  16. min-len: 2
  17. min-occurrences: 3
  18. misspell:
  19. locale: US
  20. goimports:
  21. local-prefixes: github.com/IBM/sarama
  22. gocritic:
  23. enabled-tags:
  24. - diagnostic
  25. - performance
  26. # - experimental
  27. # - opinionated
  28. # - style
  29. enabled-checks:
  30. - importShadow
  31. - nestingReduce
  32. - stringsCompare
  33. # - unnamedResult
  34. # - whyNoLint
  35. disabled-checks:
  36. - assignOp
  37. - appendAssign
  38. - commentedOutCode
  39. - hugeParam
  40. - ifElseChain
  41. - singleCaseSwitch
  42. - sloppyReassign
  43. funlen:
  44. lines: 300
  45. statements: 300
  46. depguard:
  47. rules:
  48. main:
  49. deny:
  50. - pkg: "io/ioutil"
  51. desc: Use the "io" and "os" packages instead.
  52. linters:
  53. disable-all: true
  54. enable:
  55. - bodyclose
  56. - depguard
  57. - exportloopref
  58. - dogsled
  59. - errcheck
  60. - errorlint
  61. - funlen
  62. - gochecknoinits
  63. - gocritic
  64. - gocyclo
  65. - gofmt
  66. - goimports
  67. - gosec
  68. - govet
  69. - misspell
  70. - nilerr
  71. - staticcheck
  72. - typecheck
  73. - unconvert
  74. - unused
  75. - whitespace
  76. issues:
  77. exclude:
  78. - "G404: Use of weak random number generator"
  79. exclude-rules:
  80. # exclude some linters from running on certains files.
  81. - path: functional.*_test\.go
  82. linters:
  83. - paralleltest
  84. # maximum count of issues with the same text. set to 0 for unlimited. default is 3.
  85. max-same-issues: 0