.golangci.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. version: "2"
  2. run:
  3. build-tags: []
  4. timeout: 5m
  5. linters:
  6. default: standard
  7. enable:
  8. - bodyclose
  9. - errorlint
  10. - noctx
  11. - misspell
  12. - rowserrcheck
  13. - sqlclosecheck
  14. - unconvert
  15. - usestdlibvars
  16. exclusions:
  17. generated: lax
  18. presets:
  19. - std-error-handling
  20. paths:
  21. - frontend
  22. - internal/web/dist
  23. rules:
  24. - path: _test\.go
  25. linters:
  26. - errcheck
  27. - bodyclose
  28. - noctx
  29. # tools/openapigen relies on go/parser.ParseDir; migrating it to
  30. # golang.org/x/tools/go/packages is a generator change, out of scope here.
  31. - linters:
  32. - staticcheck
  33. text: "SA1019: parser.ParseDir"
  34. # ST1005 (capitalized error strings) conflicts with intentional
  35. # user-facing error copy that tests assert verbatim.
  36. - linters:
  37. - staticcheck
  38. text: "ST1005:"
  39. formatters:
  40. enable:
  41. - gofumpt
  42. - goimports
  43. settings:
  44. goimports:
  45. local-prefixes:
  46. - github.com/mhsanaei/3x-ui
  47. exclusions:
  48. paths:
  49. - frontend
  50. - internal/web/dist