Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2023-08-15 16:17:48 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-08-15 16:17:48 +0300
commit846089d180a7c7c41ae3aec292452f4b18f93d67 (patch)
treedb6aab5cdd4f7c45779d3a3a5c4928b0a4cf578e /.golangci.yml
parent9e0a7ed36bf556506d6c3a9bb4a8bb414eaa07af (diff)
golangci-lint: Disable use of `logrus.New()`
Globally disable the use of `logrus.New()`. Production code should obtain a logger via either `log.Default()` or `ctxlogrus.Extract()`, , while test code should be using `testhelper.NewDiscardingLogEntry()`.
Diffstat (limited to '.golangci.yml')
-rw-r--r--.golangci.yml2
1 files changed, 2 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 80720509c..b995e9795 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -74,6 +74,8 @@ linters-settings:
msg: Use the logger provided by `log.Default()` or `ctxlogrus.Extract()`.
- p: ^logrus\.StandardLogger$
msg: Use the logger provided by `log.Default()` or `ctxlogrus.Extract()`.
+ - p: ^logrus\.New$
+ msg: Use the logger provided by `log.Default()` or `ctxlogrus.Extract()`.
analyze-types: true
paralleltest:
# Ignore missing calls to `t.Parallel()` and only report incorrect uses of it.