From 313ac7d4a823b1db660f8384072c3cd66c39c71a Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 10 Jan 2022 12:12:59 +0100 Subject: [PATCH] Contributing: improve formatting section --- CONTRIBUTING.md | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c47af383..3d51dcb0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -173,31 +173,18 @@ preferred to "how it looks in Core" if everyone agrees. ### Formatting -We plan to utilize `rustfmt` for keeping the code formatting consistent. -However, this will be a gradual process since a thorough peer review is required -to make sure that no unintended changes are introduced with the change of -formatting. Thus, all PRs introducing large blocks of re-formatted code will not -be reviewed. +The repository currently does not use `rustfmt`. -The current plan is to phase it in over multiple commits or even multiple PRs, -which will introduce no changes other than re-formatting, such that each change -may be independently re-reproduced by each reviewer. The first commit should add -attributes to disable fmt for some parts of the code and a second one does the -formatting – so only the first one needs review, the rest will be reproducible. +New changes may format the code with `rustfmt`, but they should not re-format +any existing code for maintaining diff size small, keeping `git blame` intact and +reduce review time. All PRs introducing large blocks of re-formatted code will +not be reviewed. You may check the [discussion on the formatting](https://github.com/rust-bitcoin/rust-bitcoin/issues/172) and [how it is planned to coordinate it with crate refactoring](https://github.com/rust-bitcoin/rust-bitcoin/pull/525) -Before formatting with `rustfmt` is implemented, it is recommended to follow -style of the existing codebase and avoid any end-line space characters. - - +For the new code it is recommended to follow style of the existing codebase and +avoid any end-line space characters. ### Derivation