Add `tools/format-cpp` script
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 15 Dec 2020 15:36:15 +0000 (10:36 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 31 Aug 2021 18:55:52 +0000 (14:55 -0400)
commitb61d54652477503ef2b058fd8304e6c16cd5cef8
tree80c7aa38cb198a0d39dd641f58469ffbbd280e2b
parent5a8810d2f355e27381bebb9fcb6e1e254828dfdf
Add `tools/format-cpp` script

The new `format-cpp` script uses `clang-format -i` to inline-format all
the C++ files except `src/cpp-common/optional/optional.hpp` and
`src/cpp-common/string_view/string_view.hpp`.

You can run it from any directory: it always runs `clang-format -i` for
the whole project.

By default, the script runs `clang-format -i`; you can override this
with the `FORMATTER` environment variable, for example:

    $ FORMATTER='clang-format-10 -i' ./tools/format-cpp

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I1049eabf8da71ce5c1d8443e1e2cdc9a73f4b4d5
Reviewed-on: https://review.lttng.org/c/babeltrace/+/4592
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
CONTRIBUTING.adoc
Makefile.am
tools/format-cpp [new file with mode: 0755]
This page took 0.032216 seconds and 4 git commands to generate.