Repository navigation
build: Enforce all the default 'go vet' checks on all Go sources - #1186
Conversation
6dfb277 to
f0425d4
Compare
|
Build succeeded. ✔️ unit-test SUCCESS in 8m 25s |
Currently, only a so-called high-confidence subset of the default checks in 'go vet' are being run by 'go test' [1]. Since 'go vet' is part of the core Go tools, it's worth trying to use more of it. After all, golangci-lint, which is currently being run through a GitHub Action, is running the default 'go vet' checks as one of its linters [2]. It's good to have as much of the testing wrapped inside 'meson test', as possible, because it's easier to run locally and on other non-GitHub CI environments like those of downstream distributors. [1] https://pkg.go.dev/cmd/go/internal/test [2] https://golangci-lint.run/usage/linters/ https://golangci-lint.run/usage/linters/#govet containers#1186
Otherwise, there's so much spew from 'go test', including the successful tests, that the actual failures don't stand out. Note that, the different steps involved in building the code base are a lot more interdependent on each other. Hence, some extra verbosity can help understand what caused a build failure on non-interactive build environments. In contrast, the runtime outputs from each test case are a lot more isolated and independent from one another. The additional verbosity from successful tests doesn't really help understand why a particular test failed. containers#1186
|
Build failed. ✔️ unit-test SUCCESS in 8m 32s |
|
Build succeeded. ✔️ unit-test SUCCESS in 8m 35s |
The previous commit broke the golangci-lint test [1] because the GitHub Action runs on Ubuntu 22.04, which only has Shadow 4.8 [2], whereas libsubid.so was introduced in Shadow 4.9 [3]. However, that's not a big deal because 'go vet' was earlier added to the set of tests run by 'meson test' [4], and 'go vet' is one of the linters run by golangci-lint [5]. So, while it's not a proper replacement, it's good enough. [1] Commit ca8007c containers#1180 [2] https://packages.ubuntu.com/source/jammy/shadow https://packages.ubuntu.com/source/jammy-updates/shadow [3] Shadow commit 0a7888b1fad613a0 shadow-maint/shadow@0a7888b1fad613a0 shadow-maint/shadow#154 [4] Commit f695012 containers#1186 [5] https://golangci-lint.run/usage/linters/ https://golangci-lint.run/usage/linters/#govet This reverts commit 7c86f30.
The previous commit broke the golangci-lint test [1] because the GitHub Action runs on Ubuntu 22.04, which only has Shadow 4.8 [2], whereas libsubid.so was introduced in Shadow 4.9 [3]. However, that's not a big deal because 'go vet' was earlier added to the set of tests run by 'meson test' [4], and 'go vet' is one of the linters run by golangci-lint [5]. So, while it's not a proper replacement, it's good enough. [1] Commit ca8007c containers#1180 [2] https://packages.ubuntu.com/source/jammy/shadow https://packages.ubuntu.com/source/jammy-updates/shadow [3] Shadow commit 0a7888b1fad613a0 shadow-maint/shadow@0a7888b1fad613a0 shadow-maint/shadow#154 [4] Commit f695012 containers#1186 [5] https://golangci-lint.run/usage/linters/ https://golangci-lint.run/usage/linters/#govet This reverts commit 7c86f30. containers#1221
Currently, only a so-called high-confidence subset of the default checks in
go vetare being run bygo test[1]. Sincego vetis part of the core Go tools, it's worth trying to use more of it. After all, golangci-lint, which is currently being run through a GitHub Action, is running the defaultgo vetchecks as one of its linters [2].It's good to have as much of the testing wrapped inside
meson test, as possible, because it's easier to run locally and on other non-GitHub CI environments like those of downstream distributors.[1] https://pkg.go.dev/cmd/go/internal/test
[2] https://golangci-lint.run/usage/linters/
https://golangci-lint.run/usage/linters/#govet