From 572635cdf16b6632567c6c9cdf42363fdca54965 Mon Sep 17 00:00:00 2001 From: Boyan Karatotev <boyan.karatotev@arm.com> Date: Thu, 26 Sep 2024 09:08:06 +0100 Subject: [PATCH] chore(commitlint): tell editors commit line lengths are 72 characters The repository obeys an 100 character soft limit for source lines. However, commit messages generally have lines shorter than 72 characters to make gerrit print them without wrapping. Annoyingly, the editorconfig can't express this and the 100 character limit applies to commit messages, requiring manual formatting. Luckily, when writing commit messages the file `.git/COMMIT_EDITMSG` is open. So we can set its line length to be 72 characters. Change-Id: Id96dcab8ce500ee965e53dd53a51c6761811440e Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> --- .editorconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 12f786de5..1b29c8805 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,5 @@ # -# Copyright (c) 2017-2020, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -70,3 +70,6 @@ indent_style = space # [PEP8] Maximum Line Length # "Limit all lines to a maximum of 79 characters." max_line_length = 79 + +[.git/COMMIT_EDITMSG] +max_line_length = 72