Skip to content
Merged
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
1 change: 1 addition & 0 deletions pkg/cli/actionlint.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ func runActionlintOnFiles(ctx context.Context, lockFiles []string, verbose bool,
return runActionlintOnFilesWithOptions(ctx, lockFiles, verbose, strict, actionlintRunOptions{
IncludeShellcheck: true,
IncludePyflakes: true,
IgnorePatterns: defaultGhAwActionlintIgnorePatterns,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/tdd] No regression test guards this compile path — if IgnorePatterns were accidentally dropped again, no test would catch it.

💡 Suggested regression test

The existing TestNewLintCommand in lint_command_test.go verifies that defaultGhAwActionlintIgnorePatterns contains the expected patterns, but nothing verifies that runActionlintOnFiles (the compile wrapper) actually forwards them to runActionlintOnFilesWithOptions.

A lightweight guard — for example a test that injects a fake runner and asserts options.IgnorePatterns == defaultGhAwActionlintIgnorePatterns — would prevent the compile/lint drift that caused 426 false-positive findings:

// TestRunActionlintOnFilesUsesDefaultIgnorePatterns guards the compile path
// against a repeat of the missing-IgnorePatterns regression (PR #42672).
func TestRunActionlintOnFilesUsesDefaultIgnorePatterns(t *testing.T) {
    var captured actionlintRunOptions
    // inject a stub runner that records the options, then call runActionlintOnFiles
    // and assert captured.IgnorePatterns == defaultGhAwActionlintIgnorePatterns
}

@copilot please address this.

})
}

Expand Down
Loading