mirror of
https://github.com/lunchcat/sif.git
synced 2026-06-12 19:11:25 -07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user