All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: add support to check 'Fixes:' tag format
@ 2020-04-29 16:36 ` Wang YanQing
  0 siblings, 0 replies; 10+ messages in thread
From: Wang YanQing @ 2020-04-29 16:36 UTC (permalink / raw)
  To: joe
  Cc: linux-kernel, kernel-janitors, Alexei Starovoitov,
	Andy Whitcroft, Markus.Elfring, mcroce

According to submitting-patches.rst, 'Fixes:' tag has a little
stricter condition about the one line summary than normal git
commit description:
“...
Do not split the tag across multiple
lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
parsing scripts
...”

And there is no sanity check for 'Fixes:' tag format in checkpatch the same
as GIT_COMMIT_ID for git commit description, so let's expand the GIT_COMMIT_ID
to add 'Fixes:' tag format check support.

Based on original patch by Joe Perches <joe@perches.com>

Link: https://lore.kernel.org/lkml/40bfc40958fca6e2cc9b86101153aa0715fac4f7.camel@perches.com/
Signed-off-by: Wang YanQing <udknight@gmail.com>
---
 scripts/checkpatch.pl | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 23a001a..879dcf4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2818,11 +2818,13 @@ sub process {
 		    $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
 		    $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
 		    ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
+		     $line =~ /\bfixes:\s+[0-9a-f]{5,}\b/i ||
 		     ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
-		      $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
-		      $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
+		      $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i))) {
 			my $init_char = "c";
 			my $orig_commit = "";
+			my $prefix = "commit";
+			my $prefix_case = "[Cc]ommit";
 			my $short = 1;
 			my $long = 0;
 			my $case = 1;
@@ -2832,19 +2834,28 @@ sub process {
 			my $id = '0123456789ab';
 			my $orig_desc = "commit description";
 			my $description = "";
+			my $acrosslines = 0;
+			my $title = "title line";
 
-			if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
+			if ($line =~ /\b(f)ixes:\s+([0-9a-f]{5,})\b/i) {
+				$init_char = $1;
+				$orig_commit = lc($2);
+				$prefix = "Fixes:";
+				$prefix_case = "Fixes:";
+				$init_char = "F";
+				$title = "a single line title (without line breaks)";
+			} elsif ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
 				$init_char = $1;
 				$orig_commit = lc($2);
 			} elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
 				$orig_commit = lc($1);
 			}
 
-			$short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
-			$long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
-			$space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
-			$case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
-			if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
+			$short = 0 if ($line =~ /\b$prefix\s+[0-9a-f]{12,40}/i);
+			$long = 1 if ($line =~ /\b$prefix\s+[0-9a-f]{41,}/i);
+			$space = 0 if ($line =~ /\b$prefix [0-9a-f]/i);
+			$case = 0 if ($line =~ /\b$prefix_case\s+[0-9a-f]{5,40}[^A-F]/);
+			if ($line =~ /\b$prefix\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
 				$orig_desc = $1;
 				$hasparens = 1;
 			} elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
@@ -2852,23 +2863,24 @@ sub process {
 				 $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) {
 				$orig_desc = $1;
 				$hasparens = 1;
-			} elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
+			} elsif ($line =~ /\b$prefix\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
 				 defined $rawlines[$linenr] &&
 				 $rawlines[$linenr] =~ /^\s*[^"]+"\)/) {
-				$line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
+				$line =~ /\b$prefix\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
 				$orig_desc = $1;
 				$rawlines[$linenr] =~ /^\s*([^"]+)"\)/;
 				$orig_desc .= " " . $1;
 				$hasparens = 1;
+				$acrosslines = 1 if ($prefix eq "Fixes:");
 			}
 
 			($id, $description) = git_commit_info($orig_commit,
 							      $id, $orig_desc);
 
 			if (defined($id) &&
-			   ($short || $long || $space || $case || ($orig_desc ne $description) || !$hasparens)) {
+			   ($short || $long || $space || $case || ($orig_desc ne $description) || !$hasparens || $acrosslines)) {
 				ERROR("GIT_COMMIT_ID",
-				      "Please use git commit description style 'commit <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}ommit $id (\"$description\")'\n" . $herecurr);
+				      "Please use git commit description style '$prefix <12+ chars of sha1> (\"<$title>\")' - ie: '${init_char}" . substr($prefix, 1) . " $id (\"$description\")'\n" . $herecurr);
 			}
 		}
 
-- 
1.8.5.6.2.g3d8a54e.dirty

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

* [PATCH] checkpatch: add support to check 'Fixes:' tag format
@ 2020-04-29 16:36 ` Wang YanQing
  0 siblings, 0 replies; 10+ messages in thread
From: Wang YanQing @ 2020-04-29 16:36 UTC (permalink / raw)
  To: joe
  Cc: linux-kernel, kernel-janitors, Alexei Starovoitov,
	Andy Whitcroft, Markus.Elfring, mcroce

According to submitting-patches.rst, 'Fixes:' tag has a little
stricter condition about the one line summary than normal git
commit description:
“...
Do not split the tag across multiple
lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
parsing scripts
...”

And there is no sanity check for 'Fixes:' tag format in checkpatch the same
as GIT_COMMIT_ID for git commit description, so let's expand the GIT_COMMIT_ID
to add 'Fixes:' tag format check support.

Based on original patch by Joe Perches <joe@perches.com>

Link: https://lore.kernel.org/lkml/40bfc40958fca6e2cc9b86101153aa0715fac4f7.camel@perches.com/
Signed-off-by: Wang YanQing <udknight@gmail.com>
---
 scripts/checkpatch.pl | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 23a001a..879dcf4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2818,11 +2818,13 @@ sub process {
 		    $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
 		    $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
 		    ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
+		     $line =~ /\bfixes:\s+[0-9a-f]{5,}\b/i ||
 		     ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
-		      $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
-		      $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
+		      $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i))) {
 			my $init_char = "c";
 			my $orig_commit = "";
+			my $prefix = "commit";
+			my $prefix_case = "[Cc]ommit";
 			my $short = 1;
 			my $long = 0;
 			my $case = 1;
@@ -2832,19 +2834,28 @@ sub process {
 			my $id = '0123456789ab';
 			my $orig_desc = "commit description";
 			my $description = "";
+			my $acrosslines = 0;
+			my $title = "title line";
 
-			if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
+			if ($line =~ /\b(f)ixes:\s+([0-9a-f]{5,})\b/i) {
+				$init_char = $1;
+				$orig_commit = lc($2);
+				$prefix = "Fixes:";
+				$prefix_case = "Fixes:";
+				$init_char = "F";
+				$title = "a single line title (without line breaks)";
+			} elsif ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
 				$init_char = $1;
 				$orig_commit = lc($2);
 			} elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
 				$orig_commit = lc($1);
 			}
 
-			$short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
-			$long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
-			$space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
-			$case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
-			if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
+			$short = 0 if ($line =~ /\b$prefix\s+[0-9a-f]{12,40}/i);
+			$long = 1 if ($line =~ /\b$prefix\s+[0-9a-f]{41,}/i);
+			$space = 0 if ($line =~ /\b$prefix [0-9a-f]/i);
+			$case = 0 if ($line =~ /\b$prefix_case\s+[0-9a-f]{5,40}[^A-F]/);
+			if ($line =~ /\b$prefix\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
 				$orig_desc = $1;
 				$hasparens = 1;
 			} elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
@@ -2852,23 +2863,24 @@ sub process {
 				 $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) {
 				$orig_desc = $1;
 				$hasparens = 1;
-			} elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
+			} elsif ($line =~ /\b$prefix\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
 				 defined $rawlines[$linenr] &&
 				 $rawlines[$linenr] =~ /^\s*[^"]+"\)/) {
-				$line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
+				$line =~ /\b$prefix\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
 				$orig_desc = $1;
 				$rawlines[$linenr] =~ /^\s*([^"]+)"\)/;
 				$orig_desc .= " " . $1;
 				$hasparens = 1;
+				$acrosslines = 1 if ($prefix eq "Fixes:");
 			}
 
 			($id, $description) = git_commit_info($orig_commit,
 							      $id, $orig_desc);
 
 			if (defined($id) &&
-			   ($short || $long || $space || $case || ($orig_desc ne $description) || !$hasparens)) {
+			   ($short || $long || $space || $case || ($orig_desc ne $description) || !$hasparens || $acrosslines)) {
 				ERROR("GIT_COMMIT_ID",
-				      "Please use git commit description style 'commit <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}ommit $id (\"$description\")'\n" . $herecurr);
+				      "Please use git commit description style '$prefix <12+ chars of sha1> (\"<$title>\")' - ie: '${init_char}" . substr($prefix, 1) . " $id (\"$description\")'\n" . $herecurr);
 			}
 		}
 
-- 
1.8.5.6.2.g3d8a54e.dirty

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

* Re: [PATCH] checkpatch: add support to check 'Fixes:' tag format
  2020-04-29 16:36 ` Wang YanQing
@ 2020-04-29 17:40   ` Markus Elfring
  -1 siblings, 0 replies; 10+ messages in thread
From: Markus Elfring @ 2020-04-29 17:40 UTC (permalink / raw)
  To: Wang YanQing, Joe Perches, Andy Whitcroft, kernel-janitors
  Cc: linux-kernel, Alexei Starovoitov, Matteo Croce

> “...
> Do not split the tag across multiple
> lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
> parsing scripts
> ...”

Why do you not like the reformatting of the quotation so far
(if such change descriptions should cope also with specific
Unicode characters)?

“…
Do not split the tag across multiple lines, tags are exempt from
the "wrap at 75 columns" rule in order to simplify parsing scripts.
…”



> And there is no sanity check for 'Fixes:' tag format in checkpatch the same
> as GIT_COMMIT_ID for git commit description, so let's expand the GIT_COMMIT_ID
> to add 'Fixes:' tag format check support.

I have got the impression that this wording might need another bit
of fine-tuning.


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

I imagine that the support for different quotation characters
can become helpful, can't it?

Regards,
Markus

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

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

> “...
> Do not split the tag across multiple
> lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
> parsing scripts
> ...”

Why do you not like the reformatting of the quotation so far
(if such change descriptions should cope also with specific
Unicode characters)?

“…
Do not split the tag across multiple lines, tags are exempt from
the "wrap at 75 columns" rule in order to simplify parsing scripts.
…”



> And there is no sanity check for 'Fixes:' tag format in checkpatch the same
> as GIT_COMMIT_ID for git commit description, so let's expand the GIT_COMMIT_ID
> to add 'Fixes:' tag format check support.

I have got the impression that this wording might need another bit
of fine-tuning.


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

I imagine that the support for different quotation characters
can become helpful, can't it?

Regards,
Markus

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

* Re: [PATCH] checkpatch: add support to check 'Fixes:' tag format
  2020-04-29 17:40   ` Markus Elfring
@ 2020-04-30 12:56     ` Wang YanQing
  -1 siblings, 0 replies; 10+ messages in thread
From: Wang YanQing @ 2020-04-30 12:56 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Joe Perches, Andy Whitcroft, kernel-janitors, linux-kernel,
	Alexei Starovoitov, Matteo Croce

On Wed, Apr 29, 2020 at 07:40:21PM +0200, Markus Elfring wrote:
> > “...
> > Do not split the tag across multiple
> > lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
> > parsing scripts
> > ...”
> 
> Why do you not like the reformatting of the quotation so far
> (if such change descriptions should cope also with specific
> Unicode characters)?
> 
> “…
> Do not split the tag across multiple lines, tags are exempt from
> the "wrap at 75 columns" rule in order to simplify parsing scripts.
> …”
> 
>

Sigh. I will fix it, but I want to hear from Joe Perches before
next patch version.

> 
> > And there is no sanity check for 'Fixes:' tag format in checkpatch the same
> > as GIT_COMMIT_ID for git commit description, so let's expand the GIT_COMMIT_ID
> > to add 'Fixes:' tag format check support.
> 
> I have got the impression that this wording might need another bit
> of fine-tuning.

The current wording is enough I think.

> 
> 
> > +				      "Please use git commit description style '$prefix <12+ chars of sha1> (\"<$title>\")' - ie: '${init_char}" . substr($prefix, 1) . " $id (\"$description\")'\n" . $herecurr);
> 
> I imagine that the support for different quotation characters
> can become helpful, can't it?

No, we don't need to support other quotation character for 'Fixes:' tag
at least now. The submitting-patches.rst tells us the pretty format is:
“...
Fixes: %h (\"%s\")
...”

> 
> Regards,
> Markus

Thanks.

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

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

On Wed, Apr 29, 2020 at 07:40:21PM +0200, Markus Elfring wrote:
> > “...
> > Do not split the tag across multiple
> > lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
> > parsing scripts
> > ...”
> 
> Why do you not like the reformatting of the quotation so far
> (if such change descriptions should cope also with specific
> Unicode characters)?
> 
> “…
> Do not split the tag across multiple lines, tags are exempt from
> the "wrap at 75 columns" rule in order to simplify parsing scripts.
> …”
> 
>

Sigh. I will fix it, but I want to hear from Joe Perches before
next patch version.

> 
> > And there is no sanity check for 'Fixes:' tag format in checkpatch the same
> > as GIT_COMMIT_ID for git commit description, so let's expand the GIT_COMMIT_ID
> > to add 'Fixes:' tag format check support.
> 
> I have got the impression that this wording might need another bit
> of fine-tuning.

The current wording is enough I think.

> 
> 
> > +				      "Please use git commit description style '$prefix <12+ chars of sha1> (\"<$title>\")' - ie: '${init_char}" . substr($prefix, 1) . " $id (\"$description\")'\n" . $herecurr);
> 
> I imagine that the support for different quotation characters
> can become helpful, can't it?

No, we don't need to support other quotation character for 'Fixes:' tag
at least now. The submitting-patches.rst tells us the pretty format is:
“...
Fixes: %h (\"%s\")
...”

> 
> Regards,
> Markus

Thanks.

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

* Re: checkpatch: Support for alternative quotation characters around commit title?
  2020-04-30 12:56     ` Wang YanQing
@ 2020-04-30 14:06       ` Markus Elfring
  -1 siblings, 0 replies; 10+ messages in thread
From: Markus Elfring @ 2020-04-30 14:06 UTC (permalink / raw)
  To: Wang YanQing, Joe Perches, Andy Whitcroft, kernel-janitors, linux-doc
  Cc: linux-kernel, Alexei Starovoitov, Matteo Croce

> No, we don't need to support other quotation character for 'Fixes:' tag
> at least now. The submitting-patches.rst tells us the pretty format is:
> “...
> Fixes: %h (\"%s\")
> ...”

Can such a data structure still be correctly parsed if the commit title
would contain double quotes?

How do you think about to discuss delimiter variations?

Regards,
Markus

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

* Re: checkpatch: Support for alternative quotation characters around commit title?
@ 2020-04-30 14:06       ` Markus Elfring
  0 siblings, 0 replies; 10+ messages in thread
From: Markus Elfring @ 2020-04-30 14:06 UTC (permalink / raw)
  To: Wang YanQing, Joe Perches, Andy Whitcroft, kernel-janitors, linux-doc
  Cc: linux-kernel, Alexei Starovoitov, Matteo Croce

> No, we don't need to support other quotation character for 'Fixes:' tag
> at least now. The submitting-patches.rst tells us the pretty format is:
> “...
> Fixes: %h (\"%s\")
> ...”

Can such a data structure still be correctly parsed if the commit title
would contain double quotes?

How do you think about to discuss delimiter variations?

Regards,
Markus

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

* Re: [PATCH] checkpatch: add support to check 'Fixes:' tag format
  2020-04-30 12:56     ` Wang YanQing
@ 2020-04-30 15:41       ` Joe Perches
  -1 siblings, 0 replies; 10+ messages in thread
From: Joe Perches @ 2020-04-30 15:41 UTC (permalink / raw)
  To: Wang YanQing, Markus Elfring
  Cc: Andy Whitcroft, kernel-janitors, linux-kernel,
	Alexei Starovoitov, Matteo Croce

On Thu, 2020-04-30 at 20:56 +0800, Wang YanQing wrote:
> On Wed, Apr 29, 2020 at 07:40:21PM +0200, Markus Elfring wrote:
> > > “...
> > > Do not split the tag across multiple
> > > lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
> > > parsing scripts
> > > ...”
> > 
> > Why do you not like the reformatting of the quotation so far
> > (if such change descriptions should cope also with specific
> > Unicode characters)?
> > 
> > “…
> > Do not split the tag across multiple lines, tags are exempt from
> > the "wrap at 75 columns" rule in order to simplify parsing scripts.
> > …”
> > 
> > 
> 
> Sigh. I will fix it, but I want to hear from Joe Perches before
> next patch version.

Hello YanQing.

Just ignore Markus' replies here, he's well meaning
but perhaps overly focused on trying to impose formal,
but somewhat antique grammar and word choice uses that
aren't particularly important for review.

The most common variant I see here is someone writes

Fixes: SHA1 ("Truncated commit description...")

to apparently avoid a long line.

btw:

you can test your patch using checkpatch and --git like:

$ git log -10000 --no-merges --grep="Fixes:" --format=%H | \
  while read commit ; do \
    ./scripts/checkpatch.pl --git $commit --types=GIT_COMMIT_ID --quiet --nosummary; \
  done

You could filter that either by modifying the patch
changing to "GIT_COMMIT_ID_TEST" and changing to
types=GIT_COMMIT_ID_TEST just for Fixes or maybe
use another grep like grep -B3 -A3 "Fixes:" -i



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

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

On Thu, 2020-04-30 at 20:56 +0800, Wang YanQing wrote:
> On Wed, Apr 29, 2020 at 07:40:21PM +0200, Markus Elfring wrote:
> > > “...
> > > Do not split the tag across multiple
> > > lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
> > > parsing scripts
> > > ...”
> > 
> > Why do you not like the reformatting of the quotation so far
> > (if such change descriptions should cope also with specific
> > Unicode characters)?
> > 
> > “…
> > Do not split the tag across multiple lines, tags are exempt from
> > the "wrap at 75 columns" rule in order to simplify parsing scripts.
> > …”
> > 
> > 
> 
> Sigh. I will fix it, but I want to hear from Joe Perches before
> next patch version.

Hello YanQing.

Just ignore Markus' replies here, he's well meaning
but perhaps overly focused on trying to impose formal,
but somewhat antique grammar and word choice uses that
aren't particularly important for review.

The most common variant I see here is someone writes

Fixes: SHA1 ("Truncated commit description...")

to apparently avoid a long line.

btw:

you can test your patch using checkpatch and --git like:

$ git log -10000 --no-merges --grep="Fixes:" --format=%H | \
  while read commit ; do \
    ./scripts/checkpatch.pl --git $commit --types=GIT_COMMIT_ID --quiet --nosummary; \
  done

You could filter that either by modifying the patch
changing to "GIT_COMMIT_ID_TEST" and changing to
types=GIT_COMMIT_ID_TEST just for Fixes or maybe
use another grep like grep -B3 -A3 "Fixes:" -i

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

end of thread, other threads:[~2020-04-30 15:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 16:36 [PATCH] checkpatch: add support to check 'Fixes:' tag format Wang YanQing
2020-04-29 16:36 ` Wang YanQing
2020-04-29 17:40 ` Markus Elfring
2020-04-29 17:40   ` Markus Elfring
2020-04-30 12:56   ` Wang YanQing
2020-04-30 12:56     ` Wang YanQing
2020-04-30 14:06     ` checkpatch: Support for alternative quotation characters around commit title? Markus Elfring
2020-04-30 14:06       ` Markus Elfring
2020-04-30 15:41     ` [PATCH] checkpatch: add support to check 'Fixes:' tag format Joe Perches
2020-04-30 15:41       ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.