-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #218 from crazy-max/lint-multi-platform
enable golangci-lint for supported platforms
- Loading branch information
Showing
10 changed files
with
53 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build !linux | ||
// +build !linux | ||
|
||
package fsutil | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build darwin || freebsd || netbsd | ||
// +build darwin freebsd netbsd | ||
|
||
package fs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build openbsd | ||
// +build openbsd | ||
|
||
package fs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
ARG GO_VERSION=1.23 | ||
ARG XX_VERSION=1.5.0 | ||
ARG GOLANGCI_LINT_VERSION=1.61.0 | ||
|
||
FROM golang:${GO_VERSION}-alpine | ||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx | ||
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine | ||
RUN apk add --no-cache git gcc musl-dev | ||
ENV GOFLAGS="-buildvcs=false" | ||
ARG GOLANGCI_LINT_VERSION | ||
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v${GOLANGCI_LINT_VERSION} | ||
COPY --link --from=xx / / | ||
WORKDIR /go/src/github.com/tonistiigi/fsutil | ||
ARG TARGETPLATFORM | ||
RUN --mount=target=. \ | ||
--mount=target=/root/.cache,type=cache \ | ||
--mount=target=/root/.cache,type=cache,id=lint-cache-$TARGETPLATFORM \ | ||
--mount=target=/go/pkg/mod,type=cache \ | ||
xx-go --wrap && \ | ||
golangci-lint run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build windows | ||
// +build windows | ||
|
||
package fsutil | ||
|