> On Dec 23, 2021, at 21:36, David Newall <openssh at davidnewall.com>
wrote:
>
> From style.9: "These guidelines should be followed for all new
code." It's not new code.
>
> Why change it? It helps not one whit but it does hurt.
Best practice for line-length, whitespace, and other style changes is:
(1) When changing a source file with legacy style, update the file to confirm to
current style guidelines. This keeps tech debt from metastasizing.
(2) When making style changes, *put them in a separate change*. Combining style
changes and semantic changes means that, as has been pointed out, changes are
difficult to review in order to find the actual semantic change. Unit tests can
also be run to detect any errors or regression the style change might include.
(2.1) Ideally, style changes should be made by automated tooling rather than
manually. (Ideally ideally, the configuration/invocation for the automated
tooling should be included in the source repo along with the code).
(3) Generally, make the style change first, then the semantic change. This
enables tech debt reduction to happen even if the semantic change is rejected or
delayed.
--
jmk