1linters:2 enable:3 - gosimple4 - typecheck5 - govet6 - errcheck7 - staticcheck8 - unused9 - dupl10 #- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.11 - gofmt12 - misspell13 - gocritic14 - bidichk15 - ineffassign16 - revive17 - gofumpt18 - depguard19 - nakedret20 - unconvert21 - wastedassign22 - nolintlint23 - stylecheck24 enable-all: false25 disable-all: true26 fast: false2728run:29 go: 1.1830 timeout: 10m31 skip-dirs:32 - node_modules33 - public34 - web_src3536linters-settings:37 stylecheck:38 checks: ["all", "-ST1005", "-ST1003"]39 nakedret:40 max-func-lines: 041 gocritic:42 disabled-checks:43 - ifElseChain44 - singleCaseSwitch # Every time this occurred in the code, there was no other way.45 revive:46 ignore-generated-header: false47 severity: warning48 confidence: 0.849 errorCode: 150 warningCode: 151 rules:52 - name: blank-imports53 - name: context-as-argument54 - name: context-keys-type55 - name: dot-imports56 - name: error-return57 - name: error-strings58 - name: error-naming59 - name: exported60 - name: if-return61 - name: increment-decrement62 - name: var-naming63 - name: var-declaration64 - name: package-comments65 - name: range66 - name: receiver-naming67 - name: time-naming68 - name: unexported-return69 - name: indent-error-flow70 - name: errorf71 - name: duplicated-imports72 - name: modifies-value-receiver73 gofumpt:74 extra-rules: true75 lang-version: "1.18"76 depguard:77 # TODO: use depguard to replace import checks in gitea-vet78 list-type: denylist79 # Check the list against standard lib.80 include-go-root: true81 packages-with-error-message:82 - github.com/unknwon/com: "use gitea's util and replacements"8384issues:85 exclude-rules:86 # Exclude some linters from running on tests files.87 - path: _test\.go88 linters:89 - gocyclo90 - errcheck91 - dupl92 - gosec93 - unparam94 - staticcheck95 - path: models/migrations/v96 linters:97 - gocyclo98 - errcheck99 - dupl100 - gosec101 - linters:102 - dupl103 text: "webhook"104 - linters:105 - gocritic106 text: "`ID' should not be capitalized"107 - path: modules/templates/helper.go108 linters:109 - gocritic110 - linters:111 - unused112 text: "swagger"113 - path: contrib/pr/checkout.go114 linters:115 - errcheck116 - path: models/issue.go117 linters:118 - errcheck119 - path: models/migrations/120 linters:121 - errcheck122 - path: modules/log/123 linters:124 - errcheck125 - path: routers/api/v1/repo/issue_subscription.go126 linters:127 - dupl128 - path: routers/repo/view.go129 linters:130 - dupl131 - path: models/migrations/132 linters:133 - unused134 - linters:135 - staticcheck136 text: "argument x is overwritten before first use"137 - path: modules/httplib/httplib.go138 linters:139 - staticcheck140 # Enabling this would require refactoring the methods and how they are called.141 - path: models/issue_comment_list.go142 linters:143 - dupl144 - linters:145 - misspell146 text: '`Unknwon` is a misspelling of `Unknown`'147 - path: models/update.go148 linters:149 - unused150 - path: cmd/dump.go151 linters:152 - dupl153 - text: "commentFormatting: put a space between `//` and comment text"154 linters:155 - gocritic156 - text: "exitAfterDefer:"157 linters:158 - gocritic159 - path: modules/graceful/manager_windows.go160 linters:161 - staticcheck162 text: "svc.IsAnInteractiveSession is deprecated: Use IsWindowsService instead."163 - path: models/user/openid.go164 linters:165 - golint