mirror of https://github.com/jetkvm/kvm.git
Update golangci-lint
Update golangci-lint to v2. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
parent
82c018a2f6
commit
6a06788050
|
@ -26,12 +26,12 @@ jobs:
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
|
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.x
|
go-version: 1.24.x
|
||||||
- name: Create empty resource directory
|
- name: Create empty resource directory
|
||||||
run: |
|
run: |
|
||||||
mkdir -p static && touch static/.gitkeep
|
mkdir -p static && touch static/.gitkeep
|
||||||
- name: Lint
|
- name: Lint
|
||||||
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
|
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
|
||||||
with:
|
with:
|
||||||
args: --verbose
|
args: --verbose
|
||||||
version: v1.62.0
|
version: v2.0.2
|
||||||
|
|
|
@ -1,22 +1,37 @@
|
||||||
---
|
version: "2"
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- forbidigo
|
- forbidigo
|
||||||
- goimports
|
|
||||||
- misspell
|
- misspell
|
||||||
# - revive
|
|
||||||
- whitespace
|
- whitespace
|
||||||
|
settings:
|
||||||
issues:
|
|
||||||
exclude-rules:
|
|
||||||
- path: _test.go
|
|
||||||
linters:
|
|
||||||
- errcheck
|
|
||||||
|
|
||||||
linters-settings:
|
|
||||||
forbidigo:
|
forbidigo:
|
||||||
forbid:
|
forbid:
|
||||||
- p: ^fmt\.Print.*$
|
- pattern: ^fmt\.Print.*$
|
||||||
msg: Do not commit print statements. Use logger package.
|
msg: Do not commit print statements. Use logger package.
|
||||||
- p: ^log\.(Fatal|Panic|Print)(f|ln)?.*$
|
- pattern: ^log\.(Fatal|Panic|Print)(f|ln)?.*$
|
||||||
msg: Do not commit log statements. Use logger package.
|
msg: Do not commit log statements. Use logger package.
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
|
rules:
|
||||||
|
- linters:
|
||||||
|
- errcheck
|
||||||
|
path: _test.go
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
formatters:
|
||||||
|
enable:
|
||||||
|
- goimports
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
|
Loading…
Reference in New Issue