X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=CONTRIBUTING.adoc;h=268c4445ae4e8b3f33db45a8a2654e2c20edd17d;hb=426de3806a9e0aae838d69bcc8e26762dd33c788;hp=23808c041e61e99dc856f9044a4f2b74fe11a64c;hpb=7132b8384f798e2d9d00fee07bba3a56b4ace039;p=babeltrace.git diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 23808c04..268c4445 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1680,14 +1680,20 @@ You need clang-format{nbsp}15 to use the project's `.clang-format` file. To automatically format all the project's {cpp} files, run: ---- -$ ./tools/format-cpp +$ ./tools/format-cpp.sh +---- + +Pass a directory path to only format the {cpp} files it contains: + +---- +$ ./tools/format-cpp.sh ./src/cli ---- Use the `FORMATTER` environment variable to override the default formatter (`clang-format{nbsp}-i`): ---- -$ FORMATTER='clang-format-10 -i' ./tools/format-cpp +$ FORMATTER='my-clang-format-15 -i' ./tools/format-cpp.sh ---- ==== Naming