.golangci.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. run:
  2. timeout: 6m
  3. linters-settings:
  4. govet:
  5. settings:
  6. shadow:
  7. strict: true
  8. enable-all: true
  9. goconst:
  10. min-len: 2
  11. min-occurrences: 4
  12. revive:
  13. enable-all-rules: false
  14. rules:
  15. - name: var-naming
  16. disabled: true
  17. gosec:
  18. excludes:
  19. - G115 # Too many false positives.
  20. linters:
  21. enable-all: true
  22. disable:
  23. - dupl
  24. - lll
  25. - gochecknoglobals
  26. - gochecknoinits
  27. - funlen
  28. - godox
  29. - err113
  30. - wsl
  31. - nlreturn
  32. - gomnd
  33. - mnd
  34. - paralleltest
  35. - wrapcheck
  36. - testpackage
  37. - gocognit
  38. - nestif
  39. - exhaustive
  40. - forcetypeassert
  41. - gocyclo
  42. - cyclop
  43. - varnamelen
  44. - maintidx
  45. - ireturn
  46. - exhaustruct
  47. - dupword
  48. # Just causes noise
  49. - depguard
  50. # Deprecated
  51. - execinquery
  52. # Not needed in go 1.22+
  53. - exportloopref
  54. issues:
  55. exclude-use-default: false
  56. max-same-issues: 0
  57. exclude:
  58. - Deferring unsafe method "Close" on type "io\.ReadCloser"
  59. exclude-dirs:
  60. - terst
  61. exclude-files:
  62. - dbg/dbg.go
  63. - token/token_const.go
  64. exclude-rules:
  65. # Field alignment in tests isn't a performance issue.
  66. - text: fieldalignment
  67. path: _test\.go
  68. - text: Error return value of `fmt\.Fprint.*` is not checked
  69. path: tools/tester/main.go