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:
authorQuang-Minh Nguyen <qmnguyen@gitlab.com>2023-06-21 11:30:21 +0300
committerQuang-Minh Nguyen <qmnguyen@gitlab.com>2023-06-26 14:36:49 +0300
commit7b5689f42873d3a13921b2c008359c599451ceac (patch)
treeb38da8646e3d3b56d8ebc1ba2068ae272a2b882f /.golangci.yml
parent6ac87a72f42d764de827836a56c726e6d21ee96e (diff)
Implement a linter to discourage future usage of Unavailable code
The prior commit fixes inelligible usages of Unavailable status codes. To prevent this situation from happening in the future, this commit implements a linter that it warns occurrences where Unavailable code is used. Engineers can ignore it by adding a comment, but at least this practice catches their eyes.
Diffstat (limited to '.golangci.yml')
-rw-r--r--.golangci.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml
index c41e1df5d..aaca0828f 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -144,6 +144,9 @@ linters-settings:
included-functions:
- fmt.Errorf
- gitlab.com/gitlab-org/gitaly/v16/internal/structerr.*
+ unavailable_code:
+ included-functions:
+ - gitlab.com/gitlab-org/gitaly/v16/internal/structerr.NewUnavailable
issues:
exclude-use-default: false