Repository navigation
Description
Tip
Your pull request is ready to create! 🎉 ✅
Everything is OK—the changes have been pushed to a branch. Please review the protected files, then create the pull request when you are ready.
The original pull request description is below.
Overview
Adds filepathwalkpreferwalkdir, a custom analyzer that reports standard-library filepath.Walk calls and recommends filepath.WalkDir.
Evidence
- The code-pattern scan found 48 non-test
filepath.Walkcall sites underpkg/andcmd/. - Existing walk linters cover discarded traversal errors and callback error shadowing, but not the less efficient API choice.
Changes
- Resolves the standard-library function through type information, including aliases, dot imports, and parenthesized calls.
- Skips generated files, honors
nolint, and includes analysistest fixtures for bad and good cases. - Registers and documents the analyzer; leaves it advisory until existing call sites are remediated.
Validation
go test ./pkg/linters/...go build ./cmd/lintersmake fmt-go- Full
make fmtcompleted Go formatting but stopped in the JavaScript formatter stage; no unrelated files changed.
Next actions
Review the diagnostics and enable enforcement after the existing filepath.Walk call sites are migrated.
Note
Protected files
This patch modifies protected files, which may affect project dependencies, CI/CD pipelines, or agent behaviour.
Protected files
README.md
To route changes like this to a review issue instead of blocking, configure protected-files: fallback-to-issue in your workflow configuration.
Allow intentional protected-file changes
If this workflow is intended to modify these files, add specific filenames or folder prefixes to safe-outputs.create-pull-request.protected-files.exclude in the workflow Markdown frontmatter. For example, to allow .changeset/*, exclude the folder using .changeset/:
safe-outputs:
create-pull-request:
protected-files:
policy: fallback-to-issue
exclude:
- .changeset/Keep your existing policy and exclusions. Folder exclusions use path prefixes, not glob patterns, and allow all files beneath that folder, including subfolders. Other protected files still follow the configured policy. If allowed-files is configured, these paths must also match it. Run gh aw compile after updating the workflow.
- expires on Nov 15, 2026, 9:37 AM UTC-08:00
Generated by Linter Miner · copilot · routed: gpt56 max · ~36 AIC · ⌖ ~2 AIC · ⊞ 3.7K · ◷
Activity