mit-dci / opencbdc-tx

A transaction processor for a hypothetical, general-purpose, central bank digital currency
Other
896 stars 198 forks source link

Add clang formatting script to auto-format C++ files to our lint standards #293

Closed rockett-m closed 1 month ago

rockett-m commented 1 month ago

Affected Branch

trunk

Basic Diagnostics

Description

In order to reproduce the issue, follow these steps:

1. clone
2. # ./scripts/install-build-tools.sh
3. $ ./scripts/setup-dependencies.sh
4. $ ./scripts/build.sh
5. $ ./scripts/lint.sh                # to see all the linting errors
6. $ ./scripts/clang-format.sh        # to auto-fix linting errors

This will let developers format their c++ code before submitting and also cuts down on the time it will take our github workflow lint stage to run (as there will be much fewer style errors.

The first 3 calls of the ./scripts/lint.sh function will be much faster with the current warnings taken care of.

Code of Conduct

rockett-m commented 1 month ago

Edit: clang18/14 clash in mac. resolved...details in #294