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.

97 lines
2.1 KiB

  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/api/v1/repo/issue_subscription.go
  74. linters:
  75. - dupl
  76. - path: routers/repo/view.go
  77. linters:
  78. - dupl
  79. - path: models/migrations/
  80. linters:
  81. - unused
  82. - linters:
  83. - staticcheck
  84. text: "argument x is overwritten before first use"
  85. - path: modules/httplib/httplib.go
  86. linters:
  87. - staticcheck
  88. # Enabling this would require refactoring the methods and how they are called.
  89. - path: models/issue_comment_list.go
  90. linters:
  91. - dupl
  92. - linters:
  93. - misspell
  94. text: '`Unknwon` is a misspelling of `Unknown`'