aboutsummaryrefslogtreecommitdiffstats
path: root/.golangci.yml
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2022-01-03 03:30:40 +0800
committerGitHub <noreply@github.com>2022-01-02 19:30:40 +0000
commit948949f42989bbbb701a51cfe9d6bd3cd6b246c8 (patch)
tree45b2e4e49afa0e06ce396cab334007d956e1cf1e /.golangci.yml
parent766cb481f71144a150c48b04197a2396f4174baa (diff)
downloadgitea-948949f42989bbbb701a51cfe9d6bd3cd6b246c8.tar.gz
gitea-948949f42989bbbb701a51cfe9d6bd3cd6b246c8.zip
chore(lint): use golangci-lint to call revive and misspell checker. (#18145)
replace revive and misspell with golangci-lint Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diffstat (limited to '.golangci.yml')
-rw-r--r--.golangci.yml29
1 files changed, 29 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 9e64d71b59..235bb76715 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -16,6 +16,7 @@ linters:
- gocritic
- bidichk
- ineffassign
+ - revive
enable-all: false
disable-all: true
fast: false
@@ -28,6 +29,34 @@ linters-settings:
disabled-checks:
- ifElseChain
- singleCaseSwitch # Every time this occurred in the code, there was no other way.
+ revive:
+ ignore-generated-header: false
+ severity: warning
+ confidence: 0.8
+ errorCode: 1
+ warningCode: 1
+ rules:
+ - name: blank-imports
+ - name: context-as-argument
+ - name: context-keys-type
+ - name: dot-imports
+ - name: error-return
+ - name: error-strings
+ - name: error-naming
+ - name: exported
+ - name: if-return
+ - name: increment-decrement
+ - name: var-naming
+ - name: var-declaration
+ - name: package-comments
+ - name: range
+ - name: receiver-naming
+ - name: time-naming
+ - name: unexported-return
+ - name: indent-error-flow
+ - name: errorf
+ - name: duplicated-imports
+ - name: modifies-value-receiver
issues:
exclude-rules: