pi-factory icon indicating copy to clipboard operation
pi-factory copied to clipboard

shfmt -p (reformat in posix mode)

Open AnotherDroog opened this issue 5 years ago • 4 comments

shfmt brings automated formatting to shell, and is written in golang

@meeDamian What is the best way to add this to Travis, to ensure it gets run before every commit?

AnotherDroog avatar Apr 30 '19 16:04 AnotherDroog

But travis happens after commits. I'm not sure what's the question. Locally you can add it to your git hooks - see .git/hooks/pre-commit.sample in any repo.

If that software has a check mode, you can also add it to the script run on Travis so that build always fails, if check fails.

meeDamian avatar Apr 30 '19 17:04 meeDamian

It removed all trailing slashes everywhere. I would guess it breaks the code, no?

meeDamian avatar Apr 30 '19 17:04 meeDamian

It removed all trailing slashes everywhere. I would guess it breaks the code, no?

@meeDamian I’ll check before merging. Maybe the && counts as a line continuation?

AnotherDroog avatar May 02 '19 06:05 AnotherDroog

This might be useful but can we salvage some of this or close it?

nolim1t avatar Oct 07 '19 13:10 nolim1t