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-02-15 12:02:40 +0300
committerQuang-Minh Nguyen <qmnguyen@gitlab.com>2023-03-01 06:44:13 +0300
commitd1c74493afa2742170563993bd3cec7d646d4336 (patch)
treeba1ed3e6f444da88d5e9afd59c7c6c7fd05c486b /.golangci.yml
parent68e1031dedd145e03668f2179fe82b69f90adfeb (diff)
Add golangci-lint custom linter infrastructure
This commit adds the infrastructure to support custom linters. Unfortunately, golangci-lint doesn't support dynamic linter. It means that we need to compile each linter with `-buildmode=plugin` flag. The compiled artifacts are then configured in `.golangci.yml` file. New linter implementation follows the guide in this lint: https://golangci-lint.run/contributing/new-linters/ Implementing this linter requires the following steps: * Add analyzers implemting the checks to tools/gitaly-linters package * Add the new checks to `lint.go` file * Re-compile via `make gitaly-linters` or `make lint`
Diffstat (limited to '.golangci.yml')
-rw-r--r--.golangci.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 747e64a03..b9f6aa32b 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -135,6 +135,11 @@ linters-settings:
begin: false
tb:
begin: false
+ custom:
+ gitaly-linters:
+ path: ./_build/tools/gitaly-linters.so
+ description: A collection of linters tailored for Gitaly
+ original-url: gitlab.com/gitlab-org/gitaly
issues:
exclude-use-default: false