Skip to content

Commit 33eea3c

Browse files
committed
Add path to golangci-lint
1 parent 61e4a5f commit 33eea3c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ void resultNotification(message) {
117117
void lint() {
118118
sh '''
119119
echo Installing golangci-lint
120-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.49.0
121-
make lint saveOutput=true
120+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.50.0
121+
make lint saveOutput=true path=/home/builder/go/bin/
122122
echo helm template lint output: ;echo; helm-lint-output.txt; echo all tests lint output: ;echo; test-lint-output.txt
123123
'''
124124

makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dockerImage?=marklogic-centos/marklogic-server-centos:10-internal
33
## System requirement:
44
## - Go
55
## - gotestsum (if you want to enable saveOutput for testing commands)
6+
## - golangci-lint
67
## - Helm
78
## - Minikube
89
## - Docker
@@ -62,13 +63,14 @@ prepare:
6263
## Lint the code
6364
## Options:
6465
## * [saveOutput] optional. Save the output to a text file. Example: saveOutput=true
66+
## * [path] optional. path to golangci-lint executable. Example: path=/home/builder/go/bin/
6567
.PHONY: lint
6668
lint:
6769
@echo "> Linting helm charts....."
6870
helm lint --with-subcharts charts/ $(if $(saveOutput), > helm-lint-output.txt,)
6971

7072
@echo "> Linting all tests....."
71-
golangci-lint run $(if $(saveOutput), > test-lint-output.txt,)
73+
$(if $(path),$(path),)golangci-lint run $(if $(saveOutput), > test-lint-output.txt,)
7274

7375
## ---------- Testing Tasks ----------
7476

0 commit comments

Comments
 (0)