Files
diun/hack/lint.Dockerfile
Ian Fijolek 5983df6491 Fix linter
Updates golangci-lint and updates to the correct config format.

Also renames some unused parameters to `_` to appese `revive`.
2023-12-13 15:13:40 -08:00

17 lines
514 B
Docker

# syntax=docker/dockerfile:1
ARG GO_VERSION="1.21"
ARG GOLANGCI_LINT_VERSION="v1.55"
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 ./...