From 05ba77bc3dcfde2bbeb65c4f860839c63ebee98d Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Mon, 20 Apr 2020 14:27:45 -0400 Subject: [PATCH 1/1] format: AlignOperand introduces spaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Observed issue ============== t = tabs s = space tabs = 8 blanks clang-format on this code will align with the operand using space. consumed_len = sizeof(struct lttng_action_start_session_comm) + t ssssssscomm->session_name_len; We want: consumed_len = sizeof(struct lttng_action_start_session_comm) + t t comm->session_name_len; Solution ======== Explicitly set it to false. Signed-off-by: Jonathan Rajotte Change-Id: I39bee6d82b20f4b6f9587a2911abb183de767d25 Signed-off-by: Jérémie Galarneau --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 3fc5c6737..91a23c9b0 100644 --- a/.clang-format +++ b/.clang-format @@ -2,7 +2,7 @@ AlignAfterOpenBracket: DontAlign AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left -AlignOperands: true +AlignOperands: false AlignTrailingComments: false AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false -- 2.34.1