mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
chore: Enable more linters
Enable more golangci-lint linters. * `forbidigo` to stop use of non-logger console printing. * `goimports` to make sure `import` blocks are formatted nicely. * `misspell` to catch spelling mistakes. * `whitespace` to catch whitespace issues. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
---
|
||||
linters:
|
||||
enable:
|
||||
# - goimports
|
||||
# - misspell
|
||||
- forbidigo
|
||||
- goimports
|
||||
- misspell
|
||||
# - revive
|
||||
- whitespace
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: _test.go
|
||||
linters:
|
||||
- errcheck
|
||||
|
||||
linters-settings:
|
||||
forbidigo:
|
||||
forbid:
|
||||
- p: ^fmt\.Print.*$
|
||||
msg: Do not commit print statements. Use logger package.
|
||||
- p: ^log\.(Fatal|Panic|Print)(f|ln)?.*$
|
||||
msg: Do not commit log statements. Use logger package.
|
||||
|
||||
Reference in New Issue
Block a user