sessiond: disable clang-format to work around unstable output
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 20 Jun 2023 20:38:14 +0000 (16:38 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Jul 2023 18:13:50 +0000 (14:13 -0400)
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 <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp

index 7e45f0a8a1fdbd4c0081d5b51ae7b816ca61345c..c30f47efb18a3b900951cb1e172c7ede78ec056c 100644 (file)
@@ -795,8 +795,14 @@ public:
 
        void visit(const lst::environment_field<const char *>& 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. */
This page took 0.028391 seconds and 4 git commands to generate.