ci: enhance golangci-lint with additional linters

add gocritic, revive, unconvert, prealloc, bodyclose, noctx, and
exportloopref for better code quality detection
This commit is contained in:
vmfunc
2026-01-02 22:49:49 -08:00
parent 8cb4a85a99
commit 295d684054
+16
View File
@@ -7,12 +7,28 @@ linters:
- gosimple # simplifications
- ineffassign # useless assignments
- misspell # spelling mistakes
- gocritic # opinionated lints
- revive # replacement for golint
- unconvert # unnecessary type conversions
- prealloc # slice preallocation hints
- bodyclose # http response body not closed
- noctx # http requests without context
- exportloopref # loop variable capture
linters-settings:
govet:
enable-all: true
errcheck:
check-blank: false
revive:
rules:
- name: exported
arguments: [checkPrivateReceivers]
gocritic:
enabled-tags:
- diagnostic
- style
- performance
run:
timeout: 5m