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:
SuperQ
2025-03-12 16:29:45 +01:00
parent a9180c972c
commit aed453cc8c
5 changed files with 17 additions and 12 deletions

View File

@@ -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.