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.
Summary
Adds errorsnewerrorstring, a custom go/analysis linter that reports errors.New(X.Error()) when X implements error.
errors.New(err.Error()) discards the original error value, so the wrapped chain is lost and errors.Is and errors.As stop matching. Return the original error, or wrap it with fmt.Errorf("...: %w", err).
Evidence
- Source scan: the
code-pattern-scannersub-agent produced three candidates. Two were already covered by enabled linters (errorlint,modernize) and one was a false positive, so all three were rejected. This pattern is not covered by any existing linter. - Discussion mining: returned no evidence. GitHub integrity policy blocked every discussion read for this run.
- Repository scan: zero non-test hits in
pkg/andcmd/, so the linter adds no noise tomake golint-custom.
Changes
pkg/linters/errorsnewerrorstring/: analyzer,analysistestrunner, and fixtures covering positives,(nolint/redacted)suppression, and negatives.pkg/linters/registry.go: registers the analyzer.pkg/linters/doc.goandREADME.md: count and documentation.pkg/linters/doc_sync_test.go: added tonotYetEnforced. Move it tocgo.ymlLINTER_FLAGS after a CI run confirms the repo is clean.pkg/linters/spec_test.go: documented analyzer list.
(nolint/redacted):uncheckedsliceindex on one line in the analyzer silences a false positive. That linter does not recognize the len(call.Args) != 1 guard. The repo already has about 1,231 hits from that linter, and it is not CI-enforced.
Validation
go test ./pkg/linters/...passes, including the doc-sync and spec tests.- The new analyzer alone reports 0 diagnostics across
./pkg/...and./cmd/.... make agent-report-progress: Go lint, custom linters, schema freshness, and impacted tests pass.- Not passing in this sandbox: the workflow compile check fails for 8 workflows. npm registry lookups for
runtime.packagesfail with a self-signed certificate error. This PR does not touch workflow files. make install-golangci-lintcould not download from GitHub because of a sandbox TLS guard. golangci-lint v2.15.0 was built withgo installfrom the module proxy instead.
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.
Proposed in this workflow run.
- expires on Nov 18, 2026, 10:12 AM UTC-08:00
Generated by Linter Miner · copilot · routed: haiku55 xhigh · ~51 AIC · ⌖ ~2 AIC · ⊞ 4.6K · ◷
Activity
github-actions commentedon Nov 11, 2026
🍪 Issue Monster selected this for Copilot
This issue is a good candidate for automated resolution and assignment to the Copilot coding agent was requested.
If assignment succeeds, Copilot will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪