ruby-syntax-tree / syntax_tree

Interact with the Ruby syntax tree
https://ruby-syntax-tree.github.io/syntax_tree/
MIT License
563 stars 54 forks source link

Format non-Ruby STDIN/script content too #469

Open spect88 opened 1 month ago

spect88 commented 1 month ago

Hi,

this PR adds a new CLI option that can be used to specify what kind of content is being passed via STDIN or -e option.

E.g.

cat app/views/some_file.html.erb | stree format --plugins=erb --handler=erb

Some tools/editors only work with formatters that support STDIN input.