.golangci.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. run:
  2. linters-settings:
  3. govet:
  4. enable-all: true
  5. disable:
  6. - shadow
  7. - fieldalignment
  8. linters:
  9. enable-all: true
  10. disable:
  11. - cyclop
  12. - dupl
  13. - exhaustive
  14. - exhaustivestruct
  15. - errorlint
  16. - funlen
  17. - gci
  18. - gochecknoglobals
  19. - gochecknoinits
  20. - gocognit
  21. - gocritic
  22. - gocyclo
  23. - godot
  24. - godox
  25. - goerr113
  26. - gofumpt
  27. - golint #deprecated
  28. - gomnd
  29. - gomoddirectives # I think it's broken
  30. - gosec
  31. - govet
  32. - interfacer # deprecated
  33. - ifshort
  34. - ireturn # No, I _LIKE_ returning interfaces
  35. - lll
  36. - maintidx # Do this in code review
  37. - maligned # deprecated
  38. - makezero
  39. - nakedret
  40. - nestif
  41. - nlreturn
  42. - paralleltest
  43. - scopelint # deprecated
  44. - tagliatelle
  45. - testpackage
  46. - thelper # Tests are fine
  47. - varnamelen # Short names are ok
  48. - wrapcheck
  49. - wsl
  50. issues:
  51. exclude-rules:
  52. # not needed
  53. - path: /*.go
  54. text: "ST1003: should not use underscores in package names"
  55. linters:
  56. - stylecheck
  57. - path: /*.go
  58. text: "don't use an underscore in package name"
  59. linters:
  60. - revive
  61. - path: /main.go
  62. linters:
  63. - errcheck
  64. - path: internal/codegen/codegen.go
  65. linters:
  66. - errcheck
  67. - path: internal/jwxtest/jwxtest.go
  68. linters:
  69. - errcheck
  70. - errchkjson
  71. - forcetypeassert
  72. - path: /*_test.go
  73. linters:
  74. - errcheck
  75. - errchkjson
  76. - forcetypeassert
  77. - path: /*_example_test.go
  78. linters:
  79. - forbidigo
  80. - path: cmd/jwx/jwx.go
  81. linters:
  82. - forbidigo
  83. # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
  84. max-issues-per-linter: 0
  85. # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
  86. max-same-issues: 0