mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-24 11:23:12 +03:00
Update golangci-lint configuration
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
version: "2"
|
version: "2"
|
||||||
run:
|
run:
|
||||||
go: "1.25"
|
go: "1.24"
|
||||||
build-tags:
|
build-tags:
|
||||||
- with_gvisor
|
- with_gvisor
|
||||||
- with_quic
|
- with_quic
|
||||||
@@ -17,30 +17,29 @@ run:
|
|||||||
linters:
|
linters:
|
||||||
default: none
|
default: none
|
||||||
enable:
|
enable:
|
||||||
- govet
|
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- paralleltest
|
- paralleltest
|
||||||
- staticcheck
|
- staticcheck
|
||||||
|
- unused
|
||||||
|
- modernize
|
||||||
settings:
|
settings:
|
||||||
|
modernize:
|
||||||
|
disable:
|
||||||
|
- omitzero # nested struct omitempty -> omitzero changes JSON output semantics
|
||||||
staticcheck:
|
staticcheck:
|
||||||
checks:
|
checks:
|
||||||
- all
|
- all
|
||||||
- -S1000
|
- -QF1008 # could remove embedded field "<interface>" from selector
|
||||||
- -S1008
|
- -ST1003 # should not use ALL_CAPS in Go names; use CamelCase instead
|
||||||
- -S1017
|
- -QF1001 # could apply De Morgan's law
|
||||||
- -ST1003
|
|
||||||
- -QF1001
|
|
||||||
- -QF1003
|
|
||||||
- -QF1008
|
|
||||||
exclusions:
|
exclusions:
|
||||||
generated: lax
|
generated: lax
|
||||||
presets:
|
presets:
|
||||||
- comments
|
- comments
|
||||||
- common-false-positives
|
- common-false-positives
|
||||||
- legacy
|
|
||||||
- std-error-handling
|
|
||||||
paths:
|
paths:
|
||||||
- transport/simple-obfs
|
- transport/simple-obfs
|
||||||
|
- \.pb\.go$
|
||||||
- third_party$
|
- third_party$
|
||||||
- builtin$
|
- builtin$
|
||||||
- examples$
|
- examples$
|
||||||
@@ -55,10 +54,3 @@ formatters:
|
|||||||
- prefix(github.com/sagernet/)
|
- prefix(github.com/sagernet/)
|
||||||
- default
|
- default
|
||||||
custom-order: true
|
custom-order: true
|
||||||
exclusions:
|
|
||||||
generated: lax
|
|
||||||
paths:
|
|
||||||
- transport/simple-obfs
|
|
||||||
- third_party$
|
|
||||||
- builtin$
|
|
||||||
- examples$
|
|
||||||
|
|||||||
8
Makefile
8
Makefile
@@ -36,17 +36,11 @@ install:
|
|||||||
go build -o $(PREFIX)/bin/$(NAME) $(MAIN_PARAMS) $(MAIN)
|
go build -o $(PREFIX)/bin/$(NAME) $(MAIN_PARAMS) $(MAIN)
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@gofumpt -l -w .
|
@golangci-lint fmt
|
||||||
@gofmt -s -w .
|
|
||||||
@gci write --custom-order -s standard -s "prefix(github.com/sagernet/)" -s "default" .
|
|
||||||
|
|
||||||
fmt_docs:
|
fmt_docs:
|
||||||
go run ./cmd/internal/format_docs
|
go run ./cmd/internal/format_docs
|
||||||
|
|
||||||
fmt_install:
|
|
||||||
go install -v mvdan.cc/gofumpt@latest
|
|
||||||
go install -v github.com/daixiang0/gci@latest
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
GOOS=linux golangci-lint run ./...
|
GOOS=linux golangci-lint run ./...
|
||||||
GOOS=android golangci-lint run ./...
|
GOOS=android golangci-lint run ./...
|
||||||
|
|||||||
Reference in New Issue
Block a user