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
Adds splitindexzero, which reports strings.Split(s, sep)[0] and strings.SplitN(s, sep, 2)[0] with a constant non-empty separator. These allocate a slice just to read the first segment; strings.Cut does not.
Evidence: the codebase has ~8 such sites (e.g. pkg/workflow/known_action_credentials.go, pkg/cli/mcp_tools_management.go, pkg/cli/setup_repository.go). No existing linter or default golangci-lint rule covers this.
Details: type-aware matching of stdlib strings (aliases ok, shadowing ignored), skips generated files and honours (nolint/redacted):splitindexzero. It is registered in pkg/linters/registry.go and listed in doc.go and the README. It is added to notYetEnforced because existing violations need remediation first. Tests pass in pkg/linters and pkg/linters/splitindexzero.
The discussion-miner and code-pattern-scanner sub-agents were not run; candidates came from direct codebase grep.
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.
Activity
github-actions commentedon Nov 4, 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! 🍪
github-actions commentedon Nov 4, 2026
This issue was automatically closed because it expired on 2026-11-04T17:36:31.045Z.