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