Open rafaellehmkuhl opened 10 months ago
I can work on adding a code formatter, The Ruff Formatter or black, to enforce a new line at EOF
I can work on adding prettier to enforce a new line at EOF
That would be really nice!
I can work on adding a code formatter, The Ruff Formatter or black, to enforce a new line at EOF
Nice!
Notice we already have black
in the repository, so if it has this configuration, let's use it so we don't increase dependencies.
Got it. I'll see what I can do with the existing black. Thanks!
I don't think black and ruff support non-python files.
And I think black
and ruff
already add it by default. And shellcheck
which is currently in use doesn't format code (including that newline at end of line).
I think prettier might be the best bet for non-python files in this repo.
An alternative would be to use https://github.com/mvdan/sh shfmt
On Thu, Nov 9, 2023, 16:14 Dan Rose @.***> wrote:
And I think black and ruff already add it by default. And shellcheck which is currently in use doesn't format code (including that newline at end of line).
I think prettier might be the best bet for non-python files in this repo.
— Reply to this email directly, view it on GitHub https://github.com/bluerobotics/BlueOS/issues/2191#issuecomment-1804450320, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJIYCLS6EPKWWCKWQXXEI3YDUTQLAVCNFSM6AAAAAA7FABSOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBUGQ2TAMZSGA . You are receiving this because you commented.Message ID: @.***>
@patrickelectric you’re right. Prettier doesn’t support shell scripts, and the shell script plugin for prettier uses shfmt internally: https://github.com/un-ts/prettier/tree/master/packages/sh
Right now the linter is not doing that, which causes the files to be modified to add or remove them, depending on the commit author.
Discussed here.