ci: re-add gofmt linter

This commit is contained in:
Oscar Tovar 2022-11-16 16:25:48 -05:00
parent d986798c98
commit 340ccf3588
No known key found for this signature in database
GPG Key ID: 1A48F2EC434FBC5C
2 changed files with 1 additions and 7 deletions

View File

@ -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 .'

View File

@ -2,6 +2,7 @@ linters:
enable:
- errcheck
- gosimple
- gofmt
- govet
- ineffassign
- staticcheck