[PATCH v2 3/3] scripts,ipkg-build: format code with shfmt

Paul Spooren mail at aparcar.org
Mon Mar 15 05:40:48 GMT 2021


Hi Paul,

I'm using shfmt[1] without any extra args. Looking through the issues 
over there[2] I'll reformat it with `-sr` and `-kp`. Thanks for the 
comment.

  -sr redirect operators will be followed by a space
  -kp keep column alignment paddings

Best,
Paul

[1]: https://github.com/mvdan/sh
[2]: https://github.com/mvdan/sh/issues/377

On Tue, Feb 9, 2021 at 13:36, Paul Oranje <por at oranjevos.nl> wrote:
> Op 5 feb. 2021, om 00:59 heeft Paul Spooren <mail at aparcar.org> het 
> volgende geschreven:
>> 
>>  The script improves readability by using an automatic code 
>> formatter.
> 
> The decreases of the switch case indentation levels make sense, but 
> IMHO the removals of the space between redirection and source (e.g. 
> <prog i.s.o. < prog) do not add to the readability, and to a lesser 
> degree, nor does placing an empty or small command on the same line 
> as the case (e.g. case x) ;;).
> 
> Maybe your preferred code formatter/beautifier (which ?) could take 
> some options to steer the formatting. Would you agree?
> 
> Thanks anyway, bye,
> Paul





More information about the openwrt-devel mailing list