4
0

.golangci.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. version: '2'
  2. linters:
  3. default: none
  4. # It might be worth going through some of the disabled linters and enabling
  5. # them and fixing the items they call out e.g.: cyclop, prealloc,
  6. # paralleltest, prealloc, errcheck, dupl, unused, testifylint, gosec,
  7. # gocritic, perfsprint, exptostd, intrange, perfsprint (maybe others?)
  8. disable:
  9. - cyclop
  10. - depguard
  11. - dupl
  12. - err113
  13. - errcheck
  14. - exhaustive
  15. - exhaustruct
  16. - exptostd
  17. - forbidigo
  18. - funcorder
  19. - funlen
  20. - gochecknoglobals
  21. - gochecknoinits
  22. - gocognit
  23. - goconst
  24. - gocritic
  25. - gocyclo
  26. - godot
  27. - godox
  28. - gosec
  29. - gosmopolitan
  30. - intrange
  31. - lll
  32. - maintidx
  33. - mnd
  34. - musttag
  35. - nestif
  36. - nilerr
  37. - nlreturn
  38. - nonamedreturns
  39. - paralleltest
  40. - perfsprint
  41. - prealloc
  42. - predeclared
  43. - tagliatelle
  44. - testifylint
  45. - testpackage
  46. - tparallel
  47. - unparam
  48. - unused
  49. - varnamelen
  50. - wastedassign
  51. - whitespace
  52. - wrapcheck
  53. - wsl
  54. - zerologlint # doesn't seem to catch gitleaks/v8/logging mistakes
  55. enable:
  56. - inamedparam
  57. - misspell
  58. - revive
  59. - misspell
  60. - inamedparam
  61. - exhaustruct
  62. - inamedparam
  63. - misspell
  64. - nonamedreturns
  65. - staticcheck
  66. - unconvert
  67. exclusions:
  68. rules:
  69. - linters:
  70. - staticcheck
  71. source: 'detector\.Detect\w+\(|sources\.DirectoryTargets\(|detect\.(?:Fragment|RemoteInfo)'
  72. - linters:
  73. - misspell
  74. source: '"(?:addres|busines|clas)",'
  75. settings:
  76. staticcheck:
  77. checks:
  78. - all
  79. - '-QF1001'
  80. - '-ST1000'
  81. - '-ST1003'
  82. - '-ST1018'
  83. - '-ST1020'
  84. - '-ST1021'
  85. revive:
  86. severity: error