From: Joe Perches <joe@perches.com>
To: Jim Cromie <jim.cromie@gmail.com>,
linux-kernel@vger.kernel.org, akpm@linuxfoundation.org
Subject: Re: [PATCH 1/2] checkpatch: tolerate long lines w/o spaces
Date: Mon, 05 Feb 2024 10:02:13 -0800 [thread overview]
Message-ID: <5cfbdb015154919d24967aec4cec5890760c1dd5.camel@perches.com> (raw)
In-Reply-To: <20240203195527.212505-2-jim.cromie@gmail.com>
On Sat, 2024-02-03 at 12:55 -0700, Jim Cromie wrote:
> checkpatch complains about long lines (>75 chars), but allows a few
> exceptions:
>
> file delta changes
> filename then :
> A Fixes:, link or signature tag line
>
> Add another exception, to allow a long "word" without whitespace. The
> regex allows spaces in 1st 10 chars, so it allows the following [1],
> which current checkpatch carps about.
>
> [1] https://lore.kernel.org/lkml/20200825153338.17061-1-vincent.whitchurch@axis.com
>
> Dummy-tag: test-generic-tag-format-with-url-length-bla-bla-jeez-dont-give-up-now-there.
>
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
> ---
> scripts/checkpatch.pl | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 9c4c4a61bc83..dc17c6da3af2 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3271,6 +3271,8 @@ sub process {
> # filename then :
> $line =~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags)/i ||
> # A Fixes:, link or signature tag line
> + $line =~ /^.{10}\S+$/ ||
> + # a long single "word" without whitespace
Perhaps better would be
$line =! /^(?:\S+\s+)?\S+$/ ||
> $commit_log_possible_stack_dump)) {
> WARN("COMMIT_LOG_LONG_LINE",
> "Prefer a maximum 75 chars per line (possible unwrapped commit description?)\n" . $herecurr);
next prev parent reply other threads:[~2024-02-05 18:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-03 19:55 [PATCH 0/2] checkpatch: relax >75 warning, adjust report format Jim Cromie
2024-02-03 19:55 ` [PATCH 1/2] checkpatch: tolerate long lines w/o spaces Jim Cromie
2024-02-05 18:02 ` Joe Perches [this message]
2024-02-03 19:55 ` [PATCH 2/2] checkpatch: minor whitespace changes for readability Jim Cromie
2024-02-05 17:38 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5cfbdb015154919d24967aec4cec5890760c1dd5.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linuxfoundation.org \
--cc=jim.cromie@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®