From: Simon Marchi Date: Tue, 20 Jun 2023 20:38:14 +0000 (-0400) Subject: sessiond: disable clang-format to work around unstable output X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f65ab3f72378bd72dd992688a21e3eb39330b2cd;p=lttng-tools.git sessiond: disable clang-format to work around unstable output When running format-cpp multiple times, I see clang-format-14 alternating between these two forms: _environment += lttng::format( " {} = \"{}\";\n", field.name, escape_tsdl_env_string_value(field.value)); _environment += lttng::format(" {} = \"{}\";\n", field.name, escape_tsdl_env_string_value(field.value)); Disable clang-format locally to avoid always having some spurious changes. Change-Id: I71b10a2ad1a5264f26c61f54743f298eb10917bf Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp b/src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp index 7e45f0a8a..c30f47efb 100644 --- a/src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp +++ b/src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp @@ -795,8 +795,14 @@ public: void visit(const lst::environment_field& field) override { + /* + * clang-format 14 oscillates between two formatting for this + * line, disable it locally. + */ + /* clang-format off */ _environment += lttng::format( " {} = \"{}\";\n", field.name, escape_tsdl_env_string_value(field.value)); + /* clang-format on */ } /* Only call once. */