From: Jim Cromie <jim.cromie@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@linuxfoundation.org
Cc: joe@perches.com, Jim Cromie <jim.cromie@gmail.com>
Subject: [PATCH 0/2] checkpatch: relax >75 warning, adjust report format
Date: Sat, 3 Feb 2024 12:55:25 -0700 [thread overview]
Message-ID: <20240203195527.212505-1-jim.cromie@gmail.com> (raw)
1. current checkpatch warns: "Prefer a maximum 75 chars per line"
on [1]:
[1] https://lore.kernel.org/lkml/20200825153338.17061-1-vincent.whitchurch@axis.com
That is overly strict. Instead allow long non-whitespace strings
(\S+) to exceed 75 chars, after tolerating \s in 1st 10 chars.
This is more permissive than the current Fixes/link detector (which I
preserved), IMHO checkpatch shouldn't be that fussy; it doesn't verify
URLs either.
2. adjust report format for nicer pararaphs.
Current checkpatch format uses -------------- lines to segment the
many per-patch reports, but then inserts a blank line just above the
last per-patch report line, breaking the paragraph nature of that
report.
Move the blank line down, which places it just above the -------- line
starting the next per-patch report. Also wrap the per-patch summary
line, so its columnar position is independent of the patch-name (and
its length), and so your terminal window doesn't have to wrap the
line. This makes the report easier to visually scroll/scan, since the
status is always in the same column.
IOW, from this:
0001-checkpatch-report last line, looks part of 0002
--------------------------------------------------------------
0002-checkpatch-minor-whitespace-changes-for-readability.patch
--------------------------------------------------------------
total: 0 errors, 0 warnings, 15 lines checked
0002-checkpatch-minor-whitespace-changes-for-readability.patch has ....
-------------------------------------------------
next-patch ...
To this:
--------------------------------------------------------------
0002-checkpatch-minor-whitespace-changes-for-readability.patch
--------------------------------------------------------------
total: 0 errors, 0 warnings, 15 lines checked
0002-checkpatch-minor-whitespace-changes-for-readability.patch
has no obvious style problems and is ready for submission.
-------------------------------------------------
next-patch ...
Jim Cromie (2):
checkpatch: tolerate long lines w/o spaces
checkpatch: minor whitespace changes for readability
scripts/checkpatch.pl | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--
2.43.0
next reply other threads:[~2024-02-03 19:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-03 19:55 Jim Cromie [this message]
2024-02-03 19:55 ` [PATCH 1/2] checkpatch: tolerate long lines w/o spaces Jim Cromie
2024-02-05 18:02 ` Joe Perches
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=20240203195527.212505-1-jim.cromie@gmail.com \
--to=jim.cromie@gmail.com \
--cc=akpm@linuxfoundation.org \
--cc=joe@perches.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®