curl / Mailing Lists / curl-library / Single Mail

curl-library

code style fixes I'd like to do

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 10 Sep 2017 23:35:40 +0200 (CEST)

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.

[1] = https://github.com/curl/curl/pull/1878
[2] = https://curl.haxx.se/dev/code-style.html

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-09-10