本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.0KB

  1. linters:
  2. enable:
  3. - gosimple
  4. - deadcode
  5. - typecheck
  6. - govet
  7. - errcheck
  8. - staticcheck
  9. - unused
  10. - structcheck
  11. - varcheck
  12. - golint
  13. - dupl
  14. #- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
  15. - gofmt
  16. - misspell
  17. - gocritic
  18. enable-all: false
  19. disable-all: true
  20. fast: false
  21. run:
  22. timeout: 3m
  23. linters-settings:
  24. gocritic:
  25. disabled-checks:
  26. - ifElseChain
  27. - singleCaseSwitch # Every time this occured in the code, there was no other way.
  28. issues:
  29. exclude-rules:
  30. # Exclude some linters from running on tests files.
  31. - path: _test\.go
  32. linters:
  33. - gocyclo
  34. - errcheck
  35. - dupl
  36. - gosec
  37. - unparam
  38. - staticcheck
  39. - path: models/migrations/v
  40. linters:
  41. - gocyclo
  42. - errcheck
  43. - dupl
  44. - gosec
  45. - linters:
  46. - dupl
  47. text: "webhook"
  48. - linters:
  49. - gocritic
  50. text: "`ID' should not be capitalized"
  51. - path: modules/templates/helper.go
  52. linters:
  53. - gocritic
  54. - linters:
  55. - unused
  56. - deadcode
  57. text: "swagger"
  58. - path: contrib/pr/checkout.go
  59. linters:
  60. - errcheck
  61. - path: models/issue.go
  62. linters:
  63. - errcheck
  64. - path: models/migrations/
  65. linters:
  66. - errcheck
  67. - path: modules/log/
  68. linters:
  69. - errcheck
  70. - path: routers/routes/routes.go
  71. linters:
  72. - dupl
  73. - path: routers/repo/view.go
  74. linters:
  75. - dupl
  76. - path: models/migrations/
  77. linters:
  78. - unused
  79. - linters:
  80. - staticcheck
  81. text: "argument x is overwritten before first use"
  82. - path: modules/httplib/httplib.go
  83. linters:
  84. - staticcheck
  85. # Enabling this would require refactoring the methods and how they are called.
  86. - path: models/issue_comment_list.go
  87. linters:
  88. - dupl
  89. - linters:
  90. - misspell
  91. text: '`Unknwon` is a misspelling of `Unknown`'
上海开阖软件有限公司 沪ICP备12045867号-1