You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM--platform=${BUILDPLATFORM} ${TOOLCHAIN} AS toolchain
25
25
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev
26
26
27
27
# build tools
@@ -42,9 +42,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
42
42
&& mv /go/bin/golangci-lint /bin/golangci-lint
43
43
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
44
44
&& mv /go/bin/govulncheck /bin/govulncheck
45
-
ARG GOIMPORTS_VERSION
46
-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/tools/cmd/goimports@${GOIMPORTS_VERSION} \
47
-
&& mv /go/bin/goimports /bin/goimports
48
45
ARG GOFUMPT_VERSION
49
46
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
50
47
&& mv /go/bin/gofumpt /bin/gofumpt
@@ -81,15 +78,12 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
81
78
FROM base AS lint-gofumpt
82
79
RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'gofumpt -w .':\n${FILES}"; exit 1)
83
80
84
-
# runs goimports
85
-
FROM base AS lint-goimports
86
-
RUN FILES="$(goimports -l -local github.com/siderolabs/bldr/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/bldr/ .':\n${FILES}"; exit 1)
87
-
88
81
# runs golangci-lint
89
82
FROM base AS lint-golangci-lint
90
83
WORKDIR /src
91
84
COPY .golangci.yml .
92
85
ENV GOGC 50
86
+
RUN golangci-lint config verify --config .golangci.yml
93
87
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint --mount=type=cache,target=/go/pkg golangci-lint run --config .golangci.yml
0 commit comments