Bitcoin uses clang-format but it is not enforced by automatic tools, so we can see that some files are not formatted according to current .clang-format
standard.
This FR is also a request to format all source files according to .clang-format
.
Bitcoin uses clang-format but it is not enforced by automatic tools, so we can see that some files are not formatted according to current .clang-format
standard.
This FR is also a request to format all source files according to .clang-format
.
Thank you for the suggestion. However, Bitcoin Core does not force developers to use a specific set of tools or a specific toolchain. Every developer can use the editor or IDE of their choice and can format code freely, as long as it is valid python or C++. There are some restrictions laid out in the developer notes, but whitespace is generally not among them. When it comes to whitespace, the only requirement we have is that lines do not have trailing whitespace, as that trailing whitespace breaks the workflow with git and a bunch of editors/IDEs.
Of course, that doesn’t mean developers are not allowed to use clang-format. In fact it is encouraged to install clang-format
and run the https://github.com/bitcoin/bitcoin/tree/master/contrib/devtools#clang-format-diffpy script to preempt whitespace nitpicking. Though, we have no enforcement guidelines on this.
There are also some general considerations about style cleanups. While this stylistic change makes sense on its own, it comes at a cost and risk for the project as a whole. The weak motivation for the change does not justify the burden that it places on the project. A burden could be any of the following:
For more information about refactoring changes and stylistic cleanup, see
Generally, if the style is not mentioned nor enforced by the developer notes, we leave it up to the original author to pick whatever fits them best personally and then leave it that way until the line is touched for other reasons.
Labels
Feature