Skip to content

Add support for --stdin-filepath#808

Merged
reese merged 1 commit intotrunkfrom
reese-stdin-path
Jan 19, 2026
Merged

Add support for --stdin-filepath#808
reese merged 1 commit intotrunkfrom
reese-stdin-path

Conversation

@reese
Copy link
Collaborator

@reese reese commented Jan 19, 2026

Closes #365

This adds support for the equivalent of prettier's --stdin-filepath. This would be valuable for things like VSCode extensions to properly support .gitignore/.rubyfmtignore files, which currently aren't heavily used but could be valuable in the future, since currently some ignores are kinda shoehorned into extensions like Sorbet that could use this instead.

Also just to call this out, --stdin-filepath matches what prettier does where if the stdin-filepath is ignored, it still prints the original contents back to stdout. This is because I think editor integrations is primarily the place where you would use this, and returning "" would probably remove the whole file contents.

@reese reese merged commit b36aebf into trunk Jan 19, 2026
8 checks passed
@reese reese deleted the reese-stdin-path branch January 19, 2026 20:44
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.

Support --stdin-path or something similar to properly ignore files formatted through stdin

2 participants