mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-06-26 21:29:58 +00:00
Update linter version
This commit is contained in:
parent
d565c48690
commit
f0d87d13d6
79
.github/linters/.golangci.yml
vendored
79
.github/linters/.golangci.yml
vendored
@ -1,57 +1,70 @@
|
|||||||
run:
|
version: "2"
|
||||||
timeout: 5m
|
|
||||||
|
|
||||||
issues:
|
|
||||||
new: true
|
|
||||||
exclude-rules:
|
|
||||||
- linters:
|
|
||||||
- staticcheck
|
|
||||||
text: "SA1019:"
|
|
||||||
- linters:
|
|
||||||
- stylecheck
|
|
||||||
text: "ST1016:"
|
|
||||||
exclude-files:
|
|
||||||
- generated.*
|
|
||||||
- .pb.go
|
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- asciicheck
|
- asciicheck
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- depguard
|
- depguard
|
||||||
- gocritic
|
- gocritic
|
||||||
- gofmt
|
|
||||||
- gofumpt
|
|
||||||
- goimports
|
|
||||||
- goprintffuncname
|
- goprintffuncname
|
||||||
- gosimple
|
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- misspell
|
- misspell
|
||||||
- nakedret
|
- nakedret
|
||||||
- revive
|
- revive
|
||||||
- rowserrcheck
|
- rowserrcheck
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
|
||||||
- typecheck
|
|
||||||
- unconvert
|
- unconvert
|
||||||
- unparam
|
- unparam
|
||||||
- whitespace
|
- whitespace
|
||||||
disable:
|
disable:
|
||||||
- errcheck
|
- errcheck
|
||||||
- unused
|
- unused
|
||||||
|
settings:
|
||||||
linters-settings:
|
depguard:
|
||||||
goimports:
|
rules:
|
||||||
local-prefixes: github.com/v2fly/v2ray-core
|
Main:
|
||||||
|
deny:
|
||||||
|
- pkg: github.com/pkg/errors
|
||||||
|
desc: Should be replaced by standard lib errors package
|
||||||
revive:
|
revive:
|
||||||
rules:
|
rules:
|
||||||
- name: blank-imports
|
- name: blank-imports
|
||||||
severity: warning
|
severity: warning
|
||||||
disabled: true
|
disabled: true
|
||||||
depguard:
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
rules:
|
rules:
|
||||||
Main:
|
- linters:
|
||||||
deny:
|
- staticcheck
|
||||||
- pkg: "github.com/pkg/errors"
|
text: 'SA1019:'
|
||||||
desc: Should be replaced by standard lib errors package
|
- linters:
|
||||||
|
- staticcheck
|
||||||
|
text: 'ST1016:'
|
||||||
|
paths:
|
||||||
|
- generated.*
|
||||||
|
- .pb.go
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
issues:
|
||||||
|
new: true
|
||||||
|
formatters:
|
||||||
|
enable:
|
||||||
|
- gofmt
|
||||||
|
- gofumpt
|
||||||
|
- goimports
|
||||||
|
settings:
|
||||||
|
goimports:
|
||||||
|
local-prefixes:
|
||||||
|
- github.com/v2fly/v2ray-core
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- generated.*
|
||||||
|
- .pb.go
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
4
.github/workflows/linter.yml
vendored
4
.github/workflows/linter.yml
vendored
@ -28,8 +28,8 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v6
|
uses: golangci/golangci-lint-action@v8
|
||||||
with:
|
with:
|
||||||
version: v1.63
|
version: v2.1.6
|
||||||
args: --config=.github/linters/.golangci.yml
|
args: --config=.github/linters/.golangci.yml
|
||||||
only-new-issues: true
|
only-new-issues: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user