Skip to content

[linter-miner] feat(linters): add readerstringconv analyzer #71684

Done

Description

@github-actions

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.

Create the pull request

The original pull request description is below.


Adds readerstringconv, which reports strings.NewReader(string(b)) (b is []byte) and bytes.NewReader([]byte(s)) (s is string). These copy the data only to choose a reader type; use bytes.NewReader(b) or strings.NewReader(s) instead.

Evidence: the code scan found existing instances such as strings.NewReader(string(data)) in pkg/cli/experiments_fetch.go and pkg/cli/secret_set_command.go. The discussion miner was not run in this run.

Registered in pkg/linters/registry.go and spec_test.go. Docs updated (README, doc.go count). Added to notYetEnforced pending an enforcement audit. go test passes for pkg/linters and pkg/linters/readerstringconv. The full ./pkg/linters/... run was not confirmed. cmd/linters/main.go is unchanged, because analyzers register through registry.go.


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.

Generated by Linter Miner · copilot · sonnet55 · ~29 AIC · ⌖ ~21 AIC · ⊞ 9.9K · ◷

  • expires on Oct 31, 2026, 9:42 AM UTC-08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions