sh
sh copied to clipboard
Comments in a subshell are moved every time the formatter runs
Example file.sh:
#!/bin/sh
( # Comment
true
)
Running shfmt -w -l 1st time produces (2 spaces in front of the comment):
#!/bin/sh
( # Comment
true
)
Running shfmt -w -l 2nd time produces (3 spaces in front of the comment):
#!/bin/sh
( # Comment
true
)
Every time you run shfmt adds another space in front of the comment, never satisfied with the amount of them.