.golangci.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. version: "2"
  2. linters:
  3. enable:
  4. - asciicheck
  5. - bodyclose
  6. - depguard
  7. - gocritic
  8. - goprintffuncname
  9. - misspell
  10. - nakedret
  11. - revive
  12. - rowserrcheck
  13. - staticcheck
  14. - unconvert
  15. - unparam
  16. - whitespace
  17. disable:
  18. - errcheck
  19. - unused
  20. settings:
  21. depguard:
  22. rules:
  23. Main:
  24. deny:
  25. - pkg: github.com/pkg/errors
  26. desc: Should be replaced by standard lib errors package
  27. revive:
  28. rules:
  29. - name: blank-imports
  30. severity: warning
  31. disabled: true
  32. exclusions:
  33. generated: lax
  34. presets:
  35. - comments
  36. - common-false-positives
  37. - legacy
  38. - std-error-handling
  39. rules:
  40. - linters:
  41. - staticcheck
  42. text: 'SA1019:'
  43. - linters:
  44. - staticcheck
  45. text: 'ST1016:'
  46. paths:
  47. - generated.*
  48. - .pb.go
  49. - third_party$
  50. - builtin$
  51. - examples$
  52. issues:
  53. new: true
  54. formatters:
  55. enable:
  56. - gofmt
  57. - gofumpt
  58. - goimports
  59. settings:
  60. goimports:
  61. local-prefixes:
  62. - github.com/v2fly/v2ray-core
  63. exclusions:
  64. generated: lax
  65. paths:
  66. - generated.*
  67. - .pb.go
  68. - third_party$
  69. - builtin$
  70. - examples$