From 0c9ba3718adc28621da7f0ae8375eb73c77712d3 Mon Sep 17 00:00:00 2001 From: Joshua Temple Date: Wed, 24 Jun 2026 18:07:27 -0400 Subject: [PATCH] fix(generate): disable pyflakes in actionlint test for hermeticity TestNormalizeWorkflowPath_ActionlintClean left actionlint's -pyflakes at its default (enabled), so in sandboxes where pyflakes is on PATH it emitted extra findings and flipped the test pass/fail on ambient tooling. Pass -pyflakes= (mirroring the existing -shellcheck=) plus -no-color; the native structural and reference checks are unchanged. Closes #337. Signed-off-by: Joshua Temple --- internal/generate/generator_normalize_test.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/internal/generate/generator_normalize_test.go b/internal/generate/generator_normalize_test.go index 63de9578..3be591b4 100644 --- a/internal/generate/generator_normalize_test.go +++ b/internal/generate/generator_normalize_test.go @@ -102,10 +102,15 @@ func TestNormalizeWorkflowPath_ActionlintClean(t *testing.T) { t.Fatalf("WriteFile: %v", writeErr) } - // Disable the shellcheck integration: this test governs workflow structure - // and uses: reference validity, not the style of cascade-owned run: scripts - // (which carry their own pre-existing SC2129-style notes). - out, runErr := exec.Command(actionlint, "-shellcheck=", path).CombinedOutput() + // Disable the optional external-linter integrations (shellcheck and + // pyflakes): this test governs workflow structure and uses: reference + // validity, not the style of cascade-owned run: scripts (which carry their + // own pre-existing SC2129-style notes). Leaving these integrations on the + // default-enabled setting makes the result depend on whether (and which + // version of) shellcheck/pyflakes happens to be installed in the runner, + // which is the source of the cross-environment flakiness. -no-color keeps + // the captured output stable for the failure message. + out, runErr := exec.Command(actionlint, "-shellcheck=", "-pyflakes=", "-no-color", path).CombinedOutput() if runErr != nil { t.Errorf("actionlint found errors in generated workflow:\n%s", out) }