.golangci.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. - tenv
  67. - varcheck
  68. - whitespace
  69. - wsl
  70. - godot
  71. # - maligned
  72. # - interfacer
  73. # - nilerr
  74. # - nlreturn
  75. # - exhaustivestruct
  76. # - errname
  77. # - forbidigo
  78. run:
  79. issues:
  80. exclude-rules:
  81. - path: _test\.go
  82. linters:
  83. - lll
  84. - revive
  85. - wsl
  86. - govet
  87. - godot
  88. - errcheck
  89. - stylecheck
  90. - dupl
  91. - gocritic
  92. - gochecknoinits
  93. exclude:
  94. - G204