Re: Minor whitespace changes relating to lines of code that are being changed

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

 





On Fri, Feb 14, 2025 at 12:18 AM Stephan Bergmann <stephan.bergmann@xxxxxxxxxxxxx> wrote:
On 13.02.25 11:36, Chris Sherlock wrote:
> I see commits all the time where someone changes a line of code and changes the whitespacing in that same line of code.

I occasionally see such too, and always wonder why people do that.  My
objections are twofold:

For one, unnecessary and unrelated changes are distractions when looking
at a commit.  
... 
And for another, what is the benefit of such random whitespace changes?
The code is readable, before and after. 

I'm not following the argument. If whitespacing changes don't make the code less readable or more readable, then why would a small whitespacing change that makes the code more consistent with the surrounding code style on the lines of code you are modifying make a difference? 
 
  (To paraphrase
an example from the original PragProg book:  Mechanical workers also
don't spend time making their power drills look beautiful.  It's tools
for them that need to get their job done in a professional way, but it's
irrelevant that they may look patched and ugly.)

There are plenty of craftsmen who want to look after their tools. 

That's my take on it.  Of course, YMMV

Indeed. 

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux