.golangci.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. - deadcode
  41. - depguard
  42. - dupl
  43. - errcheck
  44. - gochecknoinits
  45. - gocritic
  46. - gofmt
  47. - goimports
  48. - goprintffuncname
  49. - gosec
  50. - gosimple
  51. - govet
  52. - ineffassign
  53. - lll
  54. - misspell
  55. - nakedret
  56. - prealloc
  57. - revive
  58. - rowserrcheck
  59. - staticcheck
  60. - structcheck
  61. - stylecheck
  62. - typecheck
  63. - unconvert
  64. - unparam
  65. - unused
  66. - varcheck
  67. - whitespace
  68. - wsl
  69. - godot
  70. # - maligned
  71. # - interfacer
  72. # - nilerr
  73. # - nlreturn
  74. # - exhaustivestruct
  75. # - errname
  76. # - forbidigo
  77. run:
  78. issues:
  79. exclude-rules:
  80. - path: _test\.go
  81. linters:
  82. - lll
  83. - revive
  84. - wsl
  85. - govet
  86. - godot
  87. - errcheck
  88. - stylecheck
  89. - dupl
  90. - gocritic
  91. - gochecknoinits
  92. exclude:
  93. - G204