New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syntax: keep inline comments inside test clauses in place #1019
Comments
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 :) |
mvdan
changed the title
[question] keep the comment on the same line as the code
syntax: keep inline comments inside test clauses in place
Jul 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?The text was updated successfully, but these errors were encountered: