You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
make check's staticcheck step can never fail: '|| echo not installed' swallows real findings (67 on main) #923
@staticcheck ./... || echo "staticcheck not installed, skipping..."
|| fires on any non-zero exit, not only on "command not found". staticcheck exits 1 when it reports findings, so a run with findings prints staticcheck not installed, skipping... and the step passes. The step cannot fail.
Verified on main (38b2d66) with staticcheck installed (/opt/homebrew/bin/staticcheck):
$ make check
3. Running staticcheck...
staticcheck not installed, skipping...
$ staticcheck ./... | wc -l
67
Examples: SA1019 (go/parser.ParseDir in api_surface_test.go:204), several ST1005, and U1000 (regexpMustCompile unused in cmd/inert_flags_test.go:328). CI doesn't run staticcheck or golangci-lint at all, so nothing checks these.
Suggested: distinguish the two cases, e.g. if command -v staticcheck >/dev/null; then staticcheck ./...; else echo "staticcheck not installed, skipping..."; fi. Then either fix the 67 findings or narrow the checks in a staticcheck.conf before the step can be made blocking, and decide whether CI should run it too. The message is also misleading as written: it says "not installed" about a tool that is installed and has just reported problems.
Activity
Make staticcheck blocking in make check and CI, and fix its 67 findin…
Make staticcheck blocking in make check and CI, and fix its 67 findin…
Make staticcheck blocking in make check and CI, and fix its 67 findin…
Remove isRecentActivity, which #923 moved to sys_linux.go and #953 le…
Remove isRecentActivity, which #923 moved to sys_linux.go and #953 le…
Remove isRecentActivity, which #923 moved to sys_linux.go and #953 le…
Count a terminal as a session only while someone is typing in it (#953)…