mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-06 07:10:28 +00:00
chore(lint): forbid importing logrus outside the logging package (#1303)
Add a `depguard` rule so everything logs through `act/common/logging`, which keeps the backend swappable. Stacked on https://gitea.com/gitea/runner/pulls/1302. Assisted-by: Codet Co-authored-by: bircni <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/1303 Reviewed-by: Zettat123 <[email protected]>
This commit is contained in:
1 parent
4e8037a93b
commit
8502663d0e
1 file changed
+7
@@ -39,6 +39,13 @@ linters:
|
||||
deny:
|
||||
- pkg: golang.org/x/exp
|
||||
desc: it's experimental and unreliable
|
||||
logrus:
|
||||
files:
|
||||
- $all
|
||||
- "!**/act/common/logging/**"
|
||||
deny:
|
||||
- pkg: github.com/sirupsen/logrus
|
||||
desc: log through gitea.com/gitea/runner/act/common/logging
|
||||
nolintlint:
|
||||
allow-unused: false
|
||||
require-explanation: true
|
||||
|
||||
Reference in new issue
Block a user