checkpatch: fix false positive for COMMIT_LOG_LONG_LINE and provide fix
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 0 repliesNew
- v21 patch 1 replySuperseded
- v11 patch 2 repliesSuperseded
Changes in v3 from the cover letter
- Provide fix option for the warning
- Update the warning count with v5.6..v5.8
- Update regex with /^\s*[a-z][\w\.\+\-]*:\/\/\S+/i (earlier: /^\s*\b[a-z][\w\.\+\-]*:\/\/\S+/i)
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | checkpatch: fix false positive for COMMIT_LOG_LONG_LINE with URLsscripts/ | +8 | 0 replies | |
| 2/2 | checkpatch: add fix option for COMMIT_LOG_LONG_LINE with URLsscripts/ | +6 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/2] checkpatch: fix false positive for COMMIT_LOG_LONG_LINE and provide fix
Currently, checkpatch gives COMMIT_LOG_LONG_LINE warning even for URL lines, which should be avoided.
An evaluation over v5.6..v5.8 found that out of 1703 warnings reported by this class, 161 are due to the line containg URLs. Out of these 161, 53 are due to lines where URL is the first non-whitespace character of the line.
Fix this false positive by suggesting to prefix the URL with "Link:". Also provide the fix option to the user.
* Applies perfectly on next-20210108
Changes in v2:
- Fix coding style ('} else {')
- Make the URL check follow RFC 3986 style
- Give warning only if the URL is first non-whitespace of the line
- Set $commit_log_long_line only for else case
- Fix the warning count with exact figures and according to first non-space char as URL
Changes in v3:
- Provide fix option for the warning
- Update the warning count with v5.6..v5.8
- Update regex with /^\s*[a-z][\w\.\+\-]*:\/\/\S+/i (earlier: /^\s*\b[a-z][\w\.\+\-]*:\/\/\S+/i)
Aditya Srivastava (2):
checkpatch: fix false positive for COMMIT_LOG_LONG_LINE with URLs
checkpatch: add fix option for COMMIT_LOG_LONG_LINE with URLs
scripts/checkpatch.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees