Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ jobs:
# the cache key, and specifying multiple go.sums is not trivial
# (see https://github.com/moby/sys/pull/160 for details).
cache: false
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.4
# We don't need to run golangci-lint here yet, but
# there's no way to avoid it, so run it on one module.
working-directory: ./mountinfo
- name: Set PACKAGES env
if: ${{ matrix.go-version == '1.18.x' }}
run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/_build/
/mount/go-local.*
coverage.txt
17 changes: 6 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
PACKAGES ?= atomicwriter capability mountinfo mount reexec sequential signal symlink user userns
BINDIR ?= _build/bin
CROSS ?= linux/arm linux/arm64 linux/ppc64le linux/s390x \
freebsd/amd64 openbsd/amd64 darwin/amd64 darwin/arm64 windows/amd64
SUDO ?= sudo -n
Expand Down Expand Up @@ -47,18 +46,14 @@ test-local:
cd atomicwriter && go mod tidy $(MOD) && go test $(MOD) $(RUN_VIA_SUDO) -v .
$(RM) atomicwriter/go-local.*

.PHONY: golangci-lint-version
golangci-lint-version:
golangci-lint version

.PHONY: lint
lint: $(BINDIR)/golangci-lint
lint: CMD=go mod download; ../$(BINDIR)/golangci-lint run
lint: golangci-lint-version
lint: CMD=go mod download; golangci-lint run
lint: foreach
lint:
$(BINDIR)/golangci-lint version

$(BINDIR)/golangci-lint: $(BINDIR)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(BINDIR) v2.0.2

$(BINDIR):
mkdir -p $(BINDIR)

.PHONY: cross
cross:
Expand Down
Loading