mirror of
https://github.com/crazy-max/diun.git
synced 2025-01-26 08:48:50 +00:00
e29ba8f703
Linters 'deadcode' and 'varcheck' are deprecated since v1.49.0 and had been replaced by 'unused'
16 lines
514 B
Docker
16 lines
514 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG GO_VERSION="1.20"
|
|
ARG GOLANGCI_LINT_VERSION="v1.51"
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS base
|
|
ENV GOFLAGS="-buildvcs=false"
|
|
RUN apk add --no-cache gcc linux-headers musl-dev
|
|
WORKDIR /src
|
|
|
|
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
|
|
FROM base AS lint
|
|
RUN --mount=type=bind,target=. \
|
|
--mount=type=cache,target=/root/.cache \
|
|
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
|
|
golangci-lint run ./...
|