From f65ab3f72378bd72dd992688a21e3eb39330b2cd Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 20 Jun 2023 16:38:14 -0400 Subject: [PATCH] sessiond: disable clang-format to work around unstable output MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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. */ -- 2.34.1