This repository was archived by the owner on Mar 22, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1515 uses : actions/checkout@v2
1616
1717 - name : Lint
18- run : make lint
18+ run : DOCKER_BUILDKIT=1 make lint
1919
2020 - name : Build
2121 run : make build
Original file line number Diff line number Diff line change 11.DEFAULT_GOAL := help
22
33PACKAGE =github.com/compose-spec/compose-ref
4+ IMAGE_PREFIX =composespec/compose-ref-
45
56GOFLAGS=-mod =vendor
67
@@ -16,9 +17,13 @@ test: ## Run tests
1617fmt : # # Format go files
1718 @goimports -e -w ./
1819
20+ .PHONY : build-validate-image
21+ build-validate-image :
22+ docker build . -f ci/Dockerfile -t $(IMAGE_PREFIX ) validate
23+
1924.PHONY : lint
20- lint : # # Verify Go files
21- golangci-lint run --config ./golangci.yml ./
25+ lint : build-validate-image
26+ docker run --rm $( IMAGE_PREFIX ) validate bash -c " golangci-lint run --config ./golangci.yml ./"
2227
2328.PHONY : setup
2429setup : # # Setup the precommit hook
Original file line number Diff line number Diff line change 1+ FROM golang:1.14
2+
3+ WORKDIR /go/src
4+
5+ ARG GOLANGCILINT_VERSION=v1.24.0
6+ RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCILINT_VERSION}
7+
8+ ENV GOFLAGS=-mod=vendor
9+ COPY . .
You can’t perform that action at this time.
0 commit comments