Skip to content

Commit 05af791

Browse files
committed
Add go fix to CI, rm old build tags
Add running "go fix" to CI. Also, remove tidy target from the Makefile (developers hardly use it), replacing it with make foreach CMD="go mod tidy" Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent d10f4e7 commit 05af791

23 files changed

+5
-27
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ jobs:
2121
echo 'PACKAGES="mountinfo mount sequential signal symlink user"' >> $GITHUB_ENV
2222
- name: go mod tidy
2323
run: |
24-
make tidy
24+
make foreach CMD="go mod tidy"
25+
git diff --exit-code
26+
- name: go fix
27+
run: |
28+
make foreach CMD="go fix"
2529
git diff --exit-code
2630
- name: Lint
2731
run: make lint

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ test: test-local
2828
test: CMD=go test $(RUN_VIA_SUDO) -v .
2929
test: foreach
3030

31-
.PHONY: tidy
32-
tidy: CMD=go mod tidy
33-
tidy: foreach
34-
3531
# Test the mount module against the local mountinfo source code instead of the
3632
# release specified in its go.mod. This allows catching regressions / breaking
3733
# changes in mountinfo.

mount/flags_bsd.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build freebsd || openbsd
2-
// +build freebsd openbsd
32

43
package mount
54

mount/flags_unix.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build !darwin && !windows
2-
// +build !darwin,!windows
32

43
package mount
54

mount/mount_errors.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build !darwin && !windows
2-
// +build !darwin,!windows
32

43
package mount
54

mount/mount_unix.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build !darwin && !windows
2-
// +build !darwin,!windows
32

43
package mount
54

mount/mount_unix_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build !darwin && !windows
2-
// +build !darwin,!windows
32

43
package mount
54

mount/mounter_freebsd.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build freebsd && cgo
2-
// +build freebsd,cgo
32

43
package mount
54

mount/mounter_openbsd.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build openbsd && cgo
2-
// +build openbsd,cgo
32

43
/*
54
Due to how OpenBSD mount(2) works, filesystem types need to be

mount/mounter_unsupported.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build (!linux && !freebsd && !openbsd && !windows && !darwin) || (freebsd && !cgo) || (openbsd && !cgo)
2-
// +build !linux,!freebsd,!openbsd,!windows,!darwin freebsd,!cgo openbsd,!cgo
32

43
package mount
54

0 commit comments

Comments
 (0)