curl-library
Re: code style fixes I'd like to do
Date: Mon, 11 Sep 2017 18:02:01 +0300
I am not likely to be one to add code here, but anything that makes code
easier to read - makes it easier to maintain and improve.
On 9/11/2017 12:35 AM, Daniel Stenberg wrote:
> 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
>
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-09-11