.golangci.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. version: "2"
  2. linters:
  3. default: none
  4. enable:
  5. - bodyclose
  6. - gocritic
  7. - govet
  8. - ineffassign
  9. - staticcheck
  10. - testifylint
  11. - unused
  12. settings:
  13. govet:
  14. disable:
  15. - fieldalignment
  16. enable-all: true
  17. exclusions:
  18. generated: lax
  19. presets:
  20. - comments
  21. - common-false-positives
  22. - legacy
  23. - std-error-handling
  24. rules:
  25. - linters:
  26. - bodyclose
  27. path: .*_test.go
  28. - linters:
  29. - bodyclose
  30. path: router/timeout_response.go
  31. # False positives on CGO generated code
  32. - linters:
  33. - staticcheck
  34. path: vips/.*
  35. text: 'SA4000:'
  36. # False positives on CGO generated code
  37. - linters:
  38. - gocritic
  39. path: vips/.*
  40. text: dupSubExpr
  41. # False positives on CGO generated code
  42. - linters:
  43. - staticcheck
  44. text: 'ST1005:'
  45. paths:
  46. - .tmp
  47. - vendor
  48. - third_party$
  49. - builtin$
  50. - examples$
  51. formatters:
  52. enable:
  53. - goimports
  54. exclusions:
  55. generated: lax
  56. paths:
  57. - .tmp
  58. - vendor
  59. - third_party$
  60. - builtin$
  61. - examples$