tools icon indicating copy to clipboard operation
tools copied to clipboard

📎 Suggest --write command when running `rome format .`

Open sebmck opened this issue 3 years ago • 3 comments

Description

It's easy to assume that running rome format . would write the files. We can make it clearer by logging a suggestion that they run rome format . --write.

sebmck avatar Nov 08 '22 14:11 sebmck

I wonder if we can find a good balance between hinting users towards using rome format . --write and not distracting users that run the command as part of their regular workflow.

How about we only show it if formatting for more than x% of files changed or if there are more than x diagnostics?

MichaReiser avatar Nov 09 '22 09:11 MichaReiser

It's all about perception, knowledge of the tool and unknown of what the user wants.

  • we will never find an heuristic that can accommodate all users without distracting them;
  • we don't know if the user read the documentation or not;
  • users "assume" that the formatter is "harmless", but we developers know that this is a disruptive action and it requires intent;

I don't have suggestions, I suppose any "solution" is fine by me - I prefer the heuristic around diagnostics, we already have that info and we don't need to "calculate" the amount of code changed - but even this solution would put some users in asking themselves "why I have this log only now?".

ematipico avatar Nov 14 '22 10:11 ematipico

👋 @rome/staff please triage this issue by adding one of the following labels: S-Bug: confirmed, S-Planned , S-Wishlist or umbrella

github-actions[bot] avatar Nov 28 '22 12:11 github-actions[bot]