diff options
author | Quang-Minh Nguyen <qmnguyen@gitlab.com> | 2023-06-21 11:30:21 +0300 |
---|---|---|
committer | Quang-Minh Nguyen <qmnguyen@gitlab.com> | 2023-06-26 14:36:49 +0300 |
commit | 7b5689f42873d3a13921b2c008359c599451ceac (patch) | |
tree | b38da8646e3d3b56d8ebc1ba2068ae272a2b882f /cmd | |
parent | 6ac87a72f42d764de827836a56c726e6d21ee96e (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 'cmd')
-rw-r--r-- | cmd/gitaly-hooks/hooks_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/gitaly-hooks/hooks_test.go b/cmd/gitaly-hooks/hooks_test.go index cebbccb09..f12e2818f 100644 --- a/cmd/gitaly-hooks/hooks_test.go +++ b/cmd/gitaly-hooks/hooks_test.go @@ -777,7 +777,8 @@ remote: error resource exhausted, please try again later }, { name: "other error - status code is hidden", - err: structerr.NewUnavailable("server is not available"), + //nolint:gitaly-linters + err: structerr.NewUnavailable("server is not available"), expectedStderr: ` remote: error executing git hook `, |