2023-08-08 16:26:54

by Jim Cromie

[permalink] [raw]
Subject: [PATCH 2/2] checkpatch: reword long-line warning about commit-msg

Reword the warning to complain about line length 1st, since thats
whats actually tested.

Cc: [email protected]
Cc: [email protected]
Signed-off-by: Jim Cromie <[email protected]>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 6aabcc1f66c1..6e789dc07420 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3272,7 +3272,7 @@ sub process {
# A Fixes:, link or signature tag line
$commit_log_possible_stack_dump)) {
WARN("COMMIT_LOG_LONG_LINE",
- "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);
+ "Prefer a maximum 75 chars per line (possible unwrapped commit description?)\n" . $herecurr);
$commit_log_long_line = 1;
}

--
2.41.0



2023-09-07 21:08:18

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH 2/2] checkpatch: reword long-line warning about commit-msg

On Thu, 2023-09-07 at 11:45 -0600, Jim Cromie wrote:
> The COMMIT_LOG_LONG_LINE warning complains about:
> 1- possible unwrapped commit description
> 2- line too long
>
> The actual test is #2, so reword it to say that 1st.
> This could reduce potential confusion for newbie users.

I don't see this as valuable.

>
> Cc: [email protected]
> Cc: [email protected]
> Cc: Kees Cook <[email protected]>
> Signed-off-by: Jim Cromie <[email protected]>
> ---
> scripts/checkpatch.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 6aabcc1f66c1..6e789dc07420 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3272,7 +3272,7 @@ sub process {
> # A Fixes:, link or signature tag line
> $commit_log_possible_stack_dump)) {
> WARN("COMMIT_LOG_LONG_LINE",
> - "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);
> + "Prefer a maximum 75 chars per line (possible unwrapped commit description?)\n" . $herecurr);
> $commit_log_long_line = 1;
> }
>