Skip to content

feat: support stdin formatting for Zed - #195

Closed
somedayiamold wants to merge 1 commit into
incu6us:masterfrom
somedayiamold:feat/zed-stdin-formatter
Closed

somedayiamold wants to merge 1 commit into
incu6us:masterfrom
somedayiamold:feat/zed-stdin-formatter

Conversation

@somedayiamold

@somedayiamold somedayiamold commented Oct 10, 2026 •

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features
    • Format Go source provided through standard input and write the formatted result to standard output when no file or directory is specified. You can also explicitly use - to provide input through standard input.
  • Documentation
    • Added instructions for configuring goimports-reviser -format as a Zed external formatter.

Co-authored-by: TRAE CLI <traecli@bytedance.com>
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7134a699-1972-498d-aad6-747a4e02f58c

📥 Commits

Reviewing files that changed from the base of the PR and between d9b1304 and 1960fea.


📒 Files selected for processing (3)
  • README.md
  • main.go
  • main_test.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.



📝 Walkthrough

Walkthrough

The CLI now reads Go source from standard input when no path is supplied or when the sole path is -. It writes formatted source to standard output. The README documents these invocation forms and Zed formatter setup.

Changes

Standard input formatting

Layer / File(s) Summary
Normalize, format, and document stdin input
main.go, main_test.go, README.md
Empty path lists and a sole - are normalized to the standard-input sentinel. Tests check path normalization and exact formatted stdout. The README describes stdin usage and Zed configuration.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature


Merge Risk: ⚪ Minimal · up to 1960f

No actionable merge-blocking issue is established. The explicit dash invocation has less test coverage than the no-path invocation.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the primary change: adding stdin formatting support for Zed.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (1 skipped: 1 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant