Stream: contributing

Topic: roc format --stdin --stdout traverses CWD


view this post on Zulip Michael Pfeifer (Jan 22 2024 at 20:43):

It looks like roc format --stdin --stdout recursively traverses the current working directory.

If I understand processing of command line options correctly, then the file or directory to be processed by the formatter defaults to the current working directory. Does this really make sense if both --stdin and --stdout are present?

I understand that this little problem does not have the highest priority. But it is annoying to me because it prevents me from running the formatter from within an Emacs buffer. I can try to work on a solution (if we agree there is a problem).

view this post on Zulip Brendan Hansknecht (Jan 22 2024 at 21:31):

Definitely sounds like a bug to me

view this post on Zulip Brendan Hansknecht (Jan 22 2024 at 21:32):

I think a PR would be quite welcome

view this post on Zulip Brendan Hansknecht (Jan 22 2024 at 21:33):

Probably the recursive behavior was added and this case was missed.

view this post on Zulip Michael Pfeifer (Jan 23 2024 at 20:11):

I created issue #6419. I'm going to work on a solution.


Last updated: Jul 06 2025 at 12:14 UTC