Linux Documentation
 help / color / mirror / Atom feed
* Re: [PATCH v5] checkpatch: add support to check 'Fixes:' tag format
       [not found] <20200503122938.GC10332@udknight>
@ 2020-05-03 13:51 ` Markus Elfring
  2020-05-03 14:37   ` Wang YanQing
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Elfring @ 2020-05-03 13:51 UTC (permalink / raw)
  To: Wang YanQing, Joe Perches, Andy Whitcroft, kernel-janitors,
	linux-doc
  Cc: linux-kernel, Alexei Starovoitov, Matteo Croce

> “...

Can the character “Horizontal ellipsis” (U+2026) be occasionally nicer
instead of three separate dots?


> The check supports below formats:

I would prefer the explicit wording for the support of (Unicode) ellipses
also in the shown commit titles.
Will the document “submitting-patches.rst” need corresponding adjustments?


> Because after GIT_COMMIT_ID supports 'Fixes:' tag format check, it could do
> the same check as the UNKNOWN_COMMIT_ID, so we don't need UNKNOWN_COMMIT_ID
> anymore and I decide to delete it.

Would you like to propose related software adjustments?


> Note: this patch also fixes double quotation mark issue for normal git
>       commit description, and now it supports double quotation mark in
>       title line, for example:
>       Commit e33e2241e272 ("Revert "cfg80211: Use 5MHz bandwidth by default
>       when checking usable channels"")

Do you care to achieve a safer data format description also for this use case?


>  This is the v5 version, and I have tested it with below command:

How do you think about to reuse the analysis approach outside
the script “checkpatch.pl”?


>  v5:
>  1: Rebased on '[PATCH v2] checkpatch: fix can't check for too long invalid commit id'.

Are the software dependencies (and corresponding development challenges) growing?


…
> +++ b/scripts/checkpatch.pl
> @@ -2818,51 +2818,101 @@ sub process {
> +		     $line =~ /\bfixes:\s+[0-9a-f]{5,}\b/i ||

Would you like to reconsider the program organisation according to
the application of regular expressions?


…
> +			if (defined($id) && $has_parens_and_dqm && ($orig_desc ne $description)) {
> +			    # Allow short description without too short!

Will another wording adjustment become relevant here?


> +			    if ($prefix eq "Fixes:") {
> +				if (length($orig_desc) >= length($description)/2) {

Will the structure of the commit title matter any more?


…
> +					$diagnostics .= "The title is too abbreviated, at least half of orignial commit title is necessary.\n";

Will the word “original” be more appropriate here?
(Why did you not integrate my previous patch review comment?)


…
> +				      "Please use git commit description style '$prefix <$sha1_length_min+ chars of sha1> (\"<$title>\")' - ie: '${init_char}" . substr($prefix, 1) .
> +				      " $id (\"$description\")'\n" . $diagnostics . $herecurr);

Can error diagnostics become multi-line?

Regards,
Markus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v5] checkpatch: add support to check 'Fixes:' tag format
  2020-05-03 13:51 ` [PATCH v5] checkpatch: add support to check 'Fixes:' tag format Markus Elfring
@ 2020-05-03 14:37   ` Wang YanQing
  2020-05-03 14:54     ` Markus Elfring
  0 siblings, 1 reply; 3+ messages in thread
From: Wang YanQing @ 2020-05-03 14:37 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Joe Perches, Andy Whitcroft, kernel-janitors, linux-doc,
	linux-kernel, Alexei Starovoitov, Matteo Croce

On Sun, May 03, 2020 at 03:51:39PM +0200, Markus Elfring wrote:
> 
> 
> …
> > +					$diagnostics .= "The title is too abbreviated, at least half of orignial commit title is necessary.\n";
> 
> Will the word “original” be more appropriate here?
> (Why did you not integrate my previous patch review comment?)

Sorry, I miss it.

This version patch has indentation issue, I will fix the typo
with the indentation issue in next version (v6).

Thanks.

> 
> 
> …
> > +				      "Please use git commit description style '$prefix <$sha1_length_min+ chars of sha1> (\"<$title>\")' - ie: '${init_char}" . substr($prefix, 1) .
> > +				      " $id (\"$description\")'\n" . $diagnostics . $herecurr);
> 
> Can error diagnostics become multi-line?
The length of "$description" is unknown, it is difficult to
cook the error message into pretty format with any length of
"$description", so let's keep it in current way.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v5] checkpatch: add support to check 'Fixes:' tag format
  2020-05-03 14:37   ` Wang YanQing
@ 2020-05-03 14:54     ` Markus Elfring
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2020-05-03 14:54 UTC (permalink / raw)
  To: Wang YanQing, Joe Perches, Andy Whitcroft, kernel-janitors,
	linux-doc
  Cc: linux-kernel, Alexei Starovoitov, Matteo Croce

>>> +				      "Please use git commit description style '$prefix <$sha1_length_min+ chars of sha1> (\"<$title>\")' - ie: '${init_char}" . substr($prefix, 1) .
>>> +				      " $id (\"$description\")'\n" . $diagnostics . $herecurr);
>>
>> Can error diagnostics become multi-line?
> The length of "$description" is unknown, it is difficult to
> cook the error message into pretty format with any length of
> "$description", so let's keep it in current way.

How do you think about a message variant like the following?

+				      "Please use git commit description style:\n$prefix <$sha1_length_min+ chars of sha1> (\"<$title>\")\n" . substr($prefix, 1)
+				      . "i. e.: '${init_char} $id (\"$description\")\n"
+				      . $diagnostics . $herecurr);


Regards,
Markus

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-03 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20200503122938.GC10332@udknight>
2020-05-03 13:51 ` [PATCH v5] checkpatch: add support to check 'Fixes:' tag format Markus Elfring
2020-05-03 14:37   ` Wang YanQing
2020-05-03 14:54     ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox