Re: [PATCH] t9001: fix/unify indentation regarding pipes somewhat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 10, 2023 at 12:09:43PM -0700, Junio C Hamano wrote:
Oswald Buddenhagen <oswald.buddenhagen@xxxxxx> writes:

but more like

	A |
	B |
	C

i'd argue that this should be written as

	A |
		B |
		C

like other continued lines (no trailing backslashes are needed here,
but it would be ok to add them, and there is in fact a commit that
does just that in other places, and one might do the same here in a
followup).

You are entitled to your own opinion, and you are welcome to stick
to it in projects you run.  But please refrain from wasting time of
this project on something that is subjective preference and has no
absolute yardstick to tell which is _right_ or _wrong_.

i think it's a rather uncontroversial statement that the whitespace should visualize the code structure to the greatest degree possible (which of course doesn't imply blindly maximizing indentation, as there are multiple considerations). so while the details can be bike-shedded to death, that doesn't mean that there isn't a trend.

i can totally see why one wouldn't indent the top-level `&&` chains in the test cases (they are really kinda a local `set -e`, and with bash one could probably actually use that with an ERR trap), but generally not indenting continuations (also of compound statements) is confusing (and doing it incorrectly even more so, as you agree).

Difference
between the above two falls into "once it is written in one way, it
is not worth the patch noise to turn it into the other way",

that i'll happily agree with in this case.

regards



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux