.golangci.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. linters-settings:
  2. dupl:
  3. threshold: 100
  4. funlen:
  5. lines: 100
  6. statements: 50
  7. goconst:
  8. min-len: 3
  9. min-occurrences: 4
  10. gocritic:
  11. enabled-tags:
  12. - diagnostic
  13. - experimental
  14. - opinionated
  15. - performance
  16. - style
  17. gocyclo:
  18. min-complexity: 15
  19. goimports:
  20. local-prefixes: github.com/Jguer/yay/v11
  21. gomnd:
  22. settings:
  23. mnd:
  24. # don't include the "operation" and "assign"
  25. checks: argument,case,condition,return
  26. govet:
  27. check-shadowing: true
  28. lll:
  29. line-length: 140
  30. maligned:
  31. suggest-new: true
  32. misspell:
  33. locale: US
  34. linters:
  35. # please, do not use `enable-all`: it's deprecated and will be removed soon.
  36. # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
  37. disable-all: true
  38. enable:
  39. - bodyclose
  40. - usestdlibvars
  41. - deadcode
  42. - depguard
  43. - dupl
  44. - errcheck
  45. - gochecknoinits
  46. - gocritic
  47. - gofmt
  48. - goimports
  49. - goprintffuncname
  50. - gosec
  51. - gosimple
  52. - govet
  53. - ineffassign
  54. - lll
  55. - misspell
  56. - nakedret
  57. - prealloc
  58. - revive
  59. - rowserrcheck
  60. - staticcheck
  61. - structcheck
  62. - stylecheck
  63. - typecheck
  64. - unconvert
  65. - unparam
  66. - unused
  67. - tenv
  68. - varcheck
  69. - whitespace
  70. - wsl
  71. - godot
  72. # - maligned
  73. # - interfacer
  74. # - nilerr
  75. # - nlreturn
  76. # - exhaustivestruct
  77. # - errname
  78. # - forbidigo
  79. run:
  80. issues:
  81. exclude-rules:
  82. - path: _test\.go
  83. linters:
  84. - lll
  85. - revive
  86. - wsl
  87. - govet
  88. - godot
  89. - errcheck
  90. - stylecheck
  91. - dupl
  92. - gocritic
  93. - gochecknoinits
  94. exclude:
  95. - G204