fix(ci): modify err check
This commit is contained in:
+14
-17
@@ -4,6 +4,7 @@ run:
|
|||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- govet
|
- govet
|
||||||
|
- errcheck
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- typecheck
|
- typecheck
|
||||||
@@ -17,6 +18,12 @@ linters:
|
|||||||
- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
|
- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
|
||||||
disable-all: true
|
disable-all: true
|
||||||
linters-settings:
|
linters-settings:
|
||||||
|
errcheck:
|
||||||
|
exclude-functions:
|
||||||
|
- io/ioutil.ReadFile
|
||||||
|
- io.Copy(*bytes.Buffer)
|
||||||
|
- io.Copy(os.Stdout)
|
||||||
|
- net.(*)
|
||||||
staticcheck:
|
staticcheck:
|
||||||
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
|
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
|
||||||
checks: ["all"]
|
checks: ["all"]
|
||||||
@@ -63,7 +70,7 @@ linters-settings:
|
|||||||
- name: argument-limit
|
- name: argument-limit
|
||||||
severity: warning
|
severity: warning
|
||||||
disabled: false
|
disabled: false
|
||||||
arguments: [5]
|
arguments: [6]
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic
|
||||||
- name: atomic
|
- name: atomic
|
||||||
severity: warning
|
severity: warning
|
||||||
@@ -72,7 +79,7 @@ linters-settings:
|
|||||||
- name: banned-characters
|
- name: banned-characters
|
||||||
severity: warning
|
severity: warning
|
||||||
disabled: false
|
disabled: false
|
||||||
arguments: ["Ω", "Σ", "σ", "7"]
|
arguments: ["Ω", "Σ", "σ"]
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr
|
||||||
- name: bool-literal-in-expr
|
- name: bool-literal-in-expr
|
||||||
severity: warning
|
severity: warning
|
||||||
@@ -86,14 +93,6 @@ linters-settings:
|
|||||||
severity: warning
|
severity: warning
|
||||||
disabled: false
|
disabled: false
|
||||||
arguments: [10]
|
arguments: [10]
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming
|
|
||||||
- name: confusing-naming
|
|
||||||
severity: warning
|
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-results
|
|
||||||
- name: confusing-results
|
|
||||||
severity: warning
|
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr
|
||||||
- name: constant-logical-expr
|
- name: constant-logical-expr
|
||||||
severity: warning
|
severity: warning
|
||||||
@@ -156,15 +155,11 @@ linters-settings:
|
|||||||
arguments:
|
arguments:
|
||||||
- "checkPrivateReceivers"
|
- "checkPrivateReceivers"
|
||||||
- "sayRepetitiveInsteadOfStutters"
|
- "sayRepetitiveInsteadOfStutters"
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter
|
|
||||||
- name: flag-parameter
|
|
||||||
severity: warning
|
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-result-limit
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-result-limit
|
||||||
- name: function-result-limit
|
- name: function-result-limit
|
||||||
severity: warning
|
severity: warning
|
||||||
disabled: false
|
disabled: false
|
||||||
arguments: [2]
|
arguments: [4]
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length
|
||||||
- name: function-length
|
- name: function-length
|
||||||
severity: warning
|
severity: warning
|
||||||
@@ -292,12 +287,14 @@ linters-settings:
|
|||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error
|
||||||
- name: unhandled-error
|
- name: unhandled-error
|
||||||
severity: warning
|
severity: warning
|
||||||
disabled: false
|
disabled: true
|
||||||
|
# bytes.Buffer.Write: package name, structure name, function name
|
||||||
arguments:
|
arguments:
|
||||||
- "fmt.Printf"
|
- "fmt.Printf"
|
||||||
- "os.(Create|WriteFile|Chmod)"
|
- "os.(Create|WriteFile|Chmod)"
|
||||||
- "net.*"
|
- "net.*"
|
||||||
- "bytes.Buffer.Write"
|
- "bytes.Buffer.WriteString"
|
||||||
|
- "con.WriteString"
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt
|
||||||
- name: unnecessary-stmt
|
- name: unnecessary-stmt
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ bind -r L resizep -R 10 # 绑定Ctrl+l为往→调整面板边缘10个单元格
|
|||||||
# 设置tmux的延迟,文档说当有干扰的时候可以设置这个参数,比如影响vim编辑的时候
|
# 设置tmux的延迟,文档说当有干扰的时候可以设置这个参数,比如影响vim编辑的时候
|
||||||
set -s escape-time 1
|
set -s escape-time 1
|
||||||
|
|
||||||
|
# 返回上一个窗口
|
||||||
|
bind g last-window
|
||||||
|
|
||||||
# 设置窗口名为当前目录名
|
# 设置窗口名为当前目录名
|
||||||
set-option -g status-interval 10
|
set-option -g status-interval 10
|
||||||
set-option -g automatic-rename on
|
set-option -g automatic-rename on
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ unsetopt BEEP
|
|||||||
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
|
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
|
||||||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"
|
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"
|
||||||
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles"
|
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles"
|
||||||
export HOMEBREW_NO_AUTO_UPDATE=true # 禁止 brew 每次安装软件都 upate
|
|
||||||
|
|
||||||
# git
|
# git
|
||||||
export REVIEW_BASE="master"
|
export REVIEW_BASE="master"
|
||||||
@@ -143,7 +142,6 @@ alias alert='terminal-notifier -title "Terminal" -message "Done with task! Exit
|
|||||||
# git
|
# git
|
||||||
alias gitb="git branch --show-current | tr -d '\n' | pbcopy"
|
alias gitb="git branch --show-current | tr -d '\n' | pbcopy"
|
||||||
alias gci="golangci-lint run -c=~/.dotfile/.golangci.yml ./..."
|
alias gci="golangci-lint run -c=~/.dotfile/.golangci.yml ./..."
|
||||||
alias gcis="golangci-lint run -c=~/.dotfile/.golangci_strict.yml ./..."
|
|
||||||
alias gmt="go mod tidy"
|
alias gmt="go mod tidy"
|
||||||
alias gtc="go test -gcflags=all=-l -cover ./..."
|
alias gtc="go test -gcflags=all=-l -cover ./..."
|
||||||
alias swg="swag init -o docs -g "
|
alias swg="swag init -o docs -g "
|
||||||
|
|||||||
+2
-1
@@ -8,6 +8,8 @@
|
|||||||
excludesfile = ~/.dotfile/git/.gitignore
|
excludesfile = ~/.dotfile/git/.gitignore
|
||||||
[push]
|
[push]
|
||||||
default = current
|
default = current
|
||||||
|
[pull]
|
||||||
|
rebase = false
|
||||||
[merge]
|
[merge]
|
||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
[includeIf "gitdir:~/workrepo/"]
|
[includeIf "gitdir:~/workrepo/"]
|
||||||
@@ -45,4 +47,3 @@
|
|||||||
# git reviewone foo.js bar.js
|
# git reviewone foo.js bar.js
|
||||||
reviewone = !vim -p +\"tabdo Gdiff $REVIEW_BASE\" +\"let g:gitgutter_diff_base = '$REVIEW_BASE'\"
|
reviewone = !vim -p +\"tabdo Gdiff $REVIEW_BASE\" +\"let g:gitgutter_diff_base = '$REVIEW_BASE'\"
|
||||||
#git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Laily'; GIT_AUTHOR_EMAIL='i@laily.net'; GIT_COMMITTER_NAME='Laily'; GIT_COMMITTER_EMAIL='i@laily.net';" HEAD
|
#git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Laily'; GIT_AUTHOR_EMAIL='i@laily.net'; GIT_COMMITTER_NAME='Laily'; GIT_COMMITTER_EMAIL='i@laily.net';" HEAD
|
||||||
|
|
||||||
|
|||||||
@@ -30,3 +30,4 @@ _testmain.go
|
|||||||
.log
|
.log
|
||||||
go.work
|
go.work
|
||||||
go.work.sum
|
go.work.sum
|
||||||
|
init_test.go
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ return require("packer").startup(function(use)
|
|||||||
-- vsnip
|
-- vsnip
|
||||||
use 'hrsh7th/cmp-vsnip' -- { name = 'vsnip' }
|
use 'hrsh7th/cmp-vsnip' -- { name = 'vsnip' }
|
||||||
use 'hrsh7th/vim-vsnip'
|
use 'hrsh7th/vim-vsnip'
|
||||||
use 'rafamadriz/friendly-snippets'
|
-- use 'rafamadriz/friendly-snippets'
|
||||||
-- lspkind
|
-- lspkind
|
||||||
use 'onsails/lspkind-nvim'
|
use 'onsails/lspkind-nvim'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user