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 the split-index-zero-prefer-cut Go analyzer to flag strings.Split(s, sep)[0] when a provably non-empty separator causes unnecessary substring allocation.
Key changes
- Handles constant index zero, parenthesized expressions, generated-file skipping,
nolintdirectives, and coverage-aware hot-path gating. - Registers the analyzer and updates linter documentation and registry synchronization tests.
- The code-pattern scan found a concrete occurrence in
pkg/cli/edit_command.go; discussion mining found related candidates that are already implemented.
Validation
go test ./pkg/linters/split-index-zero-prefer-cut/... ./pkg/lintersgo build ./cmd/lintersmake test-unitmake fmt-gomake fmtreached successful Go formatting but stopped infmt-cjs.
References:
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 11, 2026, 9:41 AM UTC-08:00
Generated by Linter Miner · copilot · routed: gpt56 max · ~50 AIC · ⌖ ~2 AIC · ⊞ 3.7K · ◷
Activity
github-actions commentedon Nov 8, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, Copilot will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪