HomePhabricator

Enforce clang-format version 7.x

Description

Enforce clang-format version 7.x

Summary:
llvm 8.0 and 7.1 have been released recently.

As an example, Ubuntu recently updated to clang-format 7.1, causing
arcanist to return an error on arc lint due to version conflict.

I tested our codebase against clang-format 7.1 and 8.0, there is
a minor difference in the output (some edge cases are causing
bad indents with clang-format-7, which is fixed by clang-format-8).

Therefore both versions cannot be allowed at the same time
as it would cause arc lint to format back and forth when
using different versions.

I would have preferred to enforce >= 7.0 and < 8 in the
.arclintfile but this is not supported by arcanist.
As a workaround an additional check is performed at the linter
level to enforce using version 7.x only.

Test Plan:
With clang-format 7.0, 7.1 and 8.0:

arc lint --everything

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, deadalnix, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D3806

Details

Provenance
FabienAuthored on Aug 6 2019, 08:53
FabienPushed on Aug 8 2019, 09:40
Reviewer
Restricted Project
Differential Revision
D3806: Enforce clang-format version 7.x
Parents
rSTAGING4391a2e6d76f: Merge #12925: wallet: Logprint the start of a rescan
Branches
Unknown
Tags
Unknown