Add `tools/format-cpp` script
[babeltrace.git] / CONTRIBUTING.adoc
index b9f26eb11bb5c626cbb40e5b3dfe380156fad028..7052f2e8e232714565579f60112f8462bf20c195 100644 (file)
@@ -1689,7 +1689,14 @@ file.
 To automatically format all the project's {cpp} files, run:
 
 ----
-$ find -iname '*.cpp' -o -iname '*.hpp' -exec clang-format -i '{}' ';'
+$ ./tools/format-cpp
+----
+
+Use the `FORMATTER` environment variable to override the default
+formatter (`clang-format{nbsp}-i`):
+
+----
+$ FORMATTER='clang-format-10 -i' ./tools/format-cpp
 ----
 
 ==== Naming
This page took 0.022865 seconds and 4 git commands to generate.