diff --git a/.custom-gcl.yml b/.custom-gcl.yml new file mode 100644 index 000000000..6ca10094a --- /dev/null +++ b/.custom-gcl.yml @@ -0,0 +1,4 @@ +version: v1.57.0 +plugins: + - module: 'github.com/lightningnetwork/lnd/tools/linters' + path: ./tools/linters \ No newline at end of file diff --git a/Makefile b/Makefile index ccf95cb90..ee9b1de51 100644 --- a/Makefile +++ b/Makefile @@ -319,7 +319,7 @@ check-go-version: check-go-version-dockerfile check-go-version-yaml #? lint-source: Run static code analysis lint-source: docker-tools @$(call print, "Linting source.") - $(DOCKER_TOOLS) golangci-lint run -v $(LINT_WORKERS) + $(DOCKER_TOOLS) custom-gcl run -v $(LINT_WORKERS) #? lint: Run static code analysis lint: check-go-version lint-source diff --git a/tools/.custom-gcl.yml b/tools/.custom-gcl.yml new file mode 100644 index 000000000..dc91e4b16 --- /dev/null +++ b/tools/.custom-gcl.yml @@ -0,0 +1,4 @@ +version: v1.57.0 +plugins: + - module: 'github.com/lightningnetwork/lnd/tools/linters' + path: ./linters \ No newline at end of file diff --git a/tools/Dockerfile b/tools/Dockerfile index 47a081b68..f59c68cfb 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -11,6 +11,8 @@ RUN cd /tmp \ && mkdir -p /tmp/build/.modcache \ && cd /tmp/tools \ && go install -trimpath github.com/golangci/golangci-lint/cmd/golangci-lint \ + && golangci-lint custom \ + && mv ./custom-gcl /usr/local/bin/custom-gcl \ && chmod -R 777 /tmp/build/ \ && git config --global --add safe.directory /build