WIP: Add an image for golangci linting

In order to lint only the changes within a merge request, golangci
requires git to be installed. This image alleviates the need to
reinstall git on every CI job.

This image also includes a default `.golangci.yml` file in the hopes
of reducing duplicate work on the topic of golang conventions
at GitLab.

depends on: https://gitlab.com/gitlab-org/gitlab/merge_requests/20404
This commit is contained in:
Hayley Swimelar 2019-11-20 15:47:48 -08:00
parent 57a8370774
commit 7ea0dd0be2
2 changed files with 343 additions and 0 deletions

View file

@ -0,0 +1,5 @@
FROM golangci/golangci-lint:v1.21-alpine
# git must be installed for golangci-lint's --new-from-rev flag to work.
RUN apk --no-cache add git
# Include a default .golangci.yml
COPY /scripts/.golangci.yml /golangci/.golangci.yml