Skip to content

Commit 0c6afa2

Browse files
committed
Add golangci-lint to CI job
This job is added per the documentation: https://docs.gitlab.com/ee/development/go_guide/#automatic-linting Add libkrb5-dev to golangci-lint job This is needed to process internal/sshd/gssapi.go.
1 parent 37076c4 commit 0c6afa2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.gitlab-ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,18 @@ modules:tidy:
208208
script:
209209
- go mod tidy
210210
- git diff --exit-code go.mod go.sum
211+
212+
lint:
213+
image: golangci/golangci-lint
214+
stage: test
215+
script:
216+
- apt update && apt install -y libkrb5-dev
217+
# Write the code coverage report to gl-code-quality-report.json
218+
# and print linting issues to stdout in the format: path/to/file:line description
219+
# remove `--issues-exit-code 0` or set to non-zero to fail the job if linting issues are detected
220+
- golangci-lint run --issues-exit-code 0 --print-issued-lines=false --out-format code-climate:gl-code-quality-report.json,line-number
221+
artifacts:
222+
reports:
223+
codequality: gl-code-quality-report.json
224+
paths:
225+
- gl-code-quality-report.json

0 commit comments

Comments
 (0)