Open Freed-Wu opened 1 year ago
The formatter tries to keep comments where they are on a best-effort basis. This is probably an edge case that we should improve, although I admit it's the first time I ever see it, so it doesn't seem high priority. Patches with tests are always welcome, as long as you don't break the other test cases :)
will be formatted to
I don't like the formatted code. I want
$- != *i*
means this script is run by. ./main.sh
,$- != *c*
meanssh -c '. ./main.sh'
. so I hope to keep the comment on the same line as the code. How to avoid this behavior?