curl / Mailing Lists / curl-library / Single Mail


Re: code style fixes I'd like to do

From: Martin Kepplinger <>
Date: Tue, 12 Sep 2017 09:10:53 +0200

Am 10.09.2017 23:35 schrieb Daniel Stenberg:
> Hey,
> I've created PR 1878 [1] that makes the checksrc script check for
> space around equals and plus signs. And subsequent edits of the code
> to make it comply to this everywhere. I've gradually over the years
> become more and more convinced that we gain a lot of readability by
> making sure the code use the same style everywhere, and we enforce
> this with checksrc.
> Our code style document [2] already says this is how we should write
> code and _most_ code is already written like this.
> I think it makes sense to do this change, as it makes checksrc
> stricter and it will thus make us more likely to keep to the style
> going forward. And it will make PRs turn red if contributors don't
> comply and 'make checksrc' will help users to spot these problems
> already before they submit code to us. Potentially thus making our
> code easier to read.
> Editing code for style reasons is often debated in projects, mostly
> because it makes git blame output less useful but also since it risks
> making a lot of outstanding patches suddently get merge conflicts, so
> consider this is call for comments or perhaps a notice about what I'd
> like to merge.

I'd do it anyways. It's nice to look at beautiful code, and that's IMO
worth the "drawbacks". rebasing should come natural to people, if they
a change to go in. Why would one expect development to stop after all?
git blame will become more and more useful again :)

> [1] =
> [2] =

Received on 2017-09-12