Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add cli flag to read from STDIN #466

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

nobodywasishere
Copy link
Contributor

This will be useful for IDE stuff as I won't need to write source code to a temp file.

@veelenga veelenga requested a review from Sija August 19, 2024 17:49
src/ameba/cli/cmd.cr Outdated Show resolved Hide resolved
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
@nobodywasishere
Copy link
Contributor Author

Would help implement crystal-ameba/vscode-crystal-ameba#89

@Sija Sija added this to the 1.6.2 milestone Aug 19, 2024
@Sija Sija requested a review from veelenga August 19, 2024 18:24
@straight-shoota
Copy link
Contributor

A common indicator to read from stdin is the filename - (for example: crystal tool format -).
--stdin-filename could only provide an optional name for the stdin file.

@nobodywasishere
Copy link
Contributor Author

nobodywasishere commented Aug 20, 2024

All of the crystal tools and build/run (except format) use the --stdin-filename flag to read from STDIN, I was matching that functionality.

@nobodywasishere nobodywasishere changed the title Add cli/config option to read from STDIN Add cli flag to read from STDIN Aug 20, 2024
Copy link
Member

@veelenga veelenga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@veelenga veelenga merged commit f72f0b1 into crystal-ameba:master Aug 21, 2024
4 checks passed
@Sija Sija changed the title Add cli flag to read from STDIN Add cli flag to read from STDIN Oct 10, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants