Commit ffa9bf9a authored by Hayley Swimelar's avatar Hayley Swimelar

Do not allow failures in golang guide linting job

Instead of allowing the job to fail, we should configure
golangci-lint to exit 0 on the detection of an issue.

This will allow linting errors to be optionally evaluated
via the codeclimate report in the MR UI, while more serious
problems, such as panics, will be reported.
parent 3d56dc83
......@@ -108,13 +108,13 @@ lint:
- '[ -e .golangci.yml ] || cp /golangci/.golangci.yml .'
# Write the code coverage report to gl-code-quality-report.json
# and print linting issues to stdout in the format: path/to/file:line description
- golangci-lint run --out-format code-climate | tee gl-code-quality-report.json | jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
# remove `--issues-exit-code 0` or set to non-zero to fail the job if linting issues are detected
- golangci-lint run --issues-exit-code 0 --out-format code-climate | tee gl-code-quality-report.json | jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
allow_failure: true
```
Including a `.golangci.yml` in the root directory of the project allows for
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment