HomePhabricator

Automatically add missing braces

Description

Automatically add missing braces

Summary:
This diff adds a check to clang-tidy for adding the braces automatically.
Configuration files are added to the libraries (leveldb, secp256k1,
univalue) to avoid formatting them.

Depends on D5138.

Test Plan:
Add some missing brace somewhere in a source file if D5120 is not landed yet.

cmake -GNinja ..
ninja

Check that the files are updated with braces at build time.

Reset the file to have missing braces, then:

cmake -GNinja .. -DENABLE_CLANG_TIDY=OFF
ninja

Check that clang-tidy is not run.

Run the Gitian builds.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

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

Details

Provenance
FabienAuthored on Jan 30 2020, 17:38
FabienPushed on Feb 4 2020, 12:44
Reviewer
Restricted Project
Differential Revision
D5119: Automatically add missing braces
Parents
rSTAGING6e1e1acb25d5: [CMAKE] Fix incompatibility between clang-tidy and -fstack-reuse
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/15995