mirror of https://gitlab.com/gitlab-org/cli.git
ci: re-add gofmt linter
This commit is contained in:
parent
d986798c98
commit
340ccf3588
|
@ -2,13 +2,6 @@ lint:
|
|||
image: registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine
|
||||
stage: test
|
||||
script:
|
||||
- FMT_CMD="gofmt -w ."
|
||||
- eval "$FMT_CMD"
|
||||
- |
|
||||
if ! git diff --ignore-submodules=dirty --exit-code; then
|
||||
echo "Some files are not formatted. Please format with \`$FMT_CMD\`"
|
||||
exit 1;
|
||||
fi
|
||||
- golangci-lint --version
|
||||
# Use default .golangci.yml file from the image if one is not present in the project root.
|
||||
- '[ -e .golangci.yml ] || cp /golangci/.golangci.yml .'
|
||||
|
|
|
@ -2,6 +2,7 @@ linters:
|
|||
enable:
|
||||
- errcheck
|
||||
- gosimple
|
||||
- gofmt
|
||||
- govet
|
||||
- ineffassign
|
||||
- staticcheck
|
||||
|
|
Loading…
Reference in New Issue