public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: Introduce check for format of Fixes line in commit log
@ 2017-10-10 22:44 Parav Pandit
       [not found] ` <1507675467-24316-1-git-send-email-parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Parav Pandit @ 2017-10-10 22:44 UTC (permalink / raw)
  To: joe-6d6DIl74uiNBDgjK7y7TUQ, apw-Z7WLFzj8eWMS+FvcfC7Uqw
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, parav-VPRAkNaXOzVWk0Htik3J/w,
	Brad Erickson

This patch introduces a format check for 'Fixes' line in commit log
for 12 characters commit id and format for Fixes as ("...").

Its created against linux-rdma Doug's tree [1].

[1] git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git

Signed-off-by: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Brad Erickson <bradley-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 scripts/checkpatch.pl | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index dd2c262..7d933e4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2548,6 +2548,14 @@ sub process {
 			      "Remove Gerrit Change-Id's before submitting upstream.\n" . $herecurr);
 		}
 
+# Check for incorrect format for Fixes line in commit log
+		if ($in_commit_log && $line =~ /^\s*Fixes:/i) {
+			if ($line !~ /^\s*Fixes: [a-z0-9]{12} \(\".*?\"\)$/i) {
+				ERROR("FIXES_FORMAT",
+				      "Follow format of Fixes: <12 characters commit id> (\"...\")\n" . $herecurr);
+			}
+		}
+
 # Check if the commit log is in a possible stack dump
 		if ($in_commit_log && !$commit_log_possible_stack_dump &&
 		    ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH] checkpatch: Introduce check for format of Fixes line in commit log
       [not found] ` <1507675467-24316-1-git-send-email-parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2017-10-19  5:52   ` Parav Pandit
       [not found]     ` <VI1PR0502MB3008662D9D9D1BF80461C7CCD1420-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Parav Pandit @ 2017-10-19  5:52 UTC (permalink / raw)
  To: Parav Pandit, joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org,
	apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Brad Erickson

Hi Joe,

> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Parav Pandit
> Sent: Tuesday, October 10, 2017 5:44 PM
> To: joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org; apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Parav Pandit
> <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; Brad Erickson <bradley-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Subject: [PATCH] checkpatch: Introduce check for format of Fixes line in commit
> log
> 
> This patch introduces a format check for 'Fixes' line in commit log for 12
> characters commit id and format for Fixes as ("...").
> 
> Its created against linux-rdma Doug's tree [1].
> 
> [1] git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
> 
> Signed-off-by: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Brad Erickson <bradley-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  scripts/checkpatch.pl | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index
> dd2c262..7d933e4 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2548,6 +2548,14 @@ sub process {
>  			      "Remove Gerrit Change-Id's before submitting
> upstream.\n" . $herecurr);
>  		}
> 
> +# Check for incorrect format for Fixes line in commit log
> +		if ($in_commit_log && $line =~ /^\s*Fixes:/i) {
> +			if ($line !~ /^\s*Fixes: [a-z0-9]{12} \(\".*?\"\)$/i) {
> +				ERROR("FIXES_FORMAT",
> +				      "Follow format of Fixes: <12 characters
> commit id> (\"...\")\n" . $herecurr);
> +			}
> +		}
> +
>  # Check if the commit log is in a possible stack dump
>  		if ($in_commit_log && !$commit_log_possible_stack_dump &&
>  		    ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
> --

Did you get a chance to review this minor improvement patch?
Does it look ok?
Can it be pushed to Linux-rdma tree?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] checkpatch: Introduce check for format of Fixes line in commit log
       [not found]     ` <VI1PR0502MB3008662D9D9D1BF80461C7CCD1420-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2017-10-19  5:57       ` Joe Perches
       [not found]         ` <1508392637.6806.33.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2017-10-19  5:57 UTC (permalink / raw)
  To: Parav Pandit, apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Brad Erickson

On Thu, 2017-10-19 at 05:52 +0000, Parav Pandit wrote:
> Hi Joe,

Hello Parav

> > -----Original Message-----
> > From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> > owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Parav Pandit
> > Sent: Tuesday, October 10, 2017 5:44 PM
> > To: joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org; apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org
> > Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Parav Pandit
> > <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; Brad Erickson <bradley-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Subject: [PATCH] checkpatch: Introduce check for format of Fixes line in commit
> > log
> > 
> > This patch introduces a format check for 'Fixes' line in commit log for 12
> > characters commit id and format for Fixes as ("...").

I think this doesn't handle case like:

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58735

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH] checkpatch: Introduce check for format of Fixes line in commit log
       [not found]         ` <1508392637.6806.33.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
@ 2017-10-19  6:11           ` Parav Pandit
  0 siblings, 0 replies; 4+ messages in thread
From: Parav Pandit @ 2017-10-19  6:11 UTC (permalink / raw)
  To: Joe Perches, apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Brad Erickson



> -----Original Message-----
> From: Joe Perches [mailto:joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org]
> Sent: Thursday, October 19, 2017 12:57 AM
> To: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Brad Erickson
> <bradley-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Subject: Re: [PATCH] checkpatch: Introduce check for format of Fixes line in
> commit log
> 
> On Thu, 2017-10-19 at 05:52 +0000, Parav Pandit wrote:
> > Hi Joe,
> 
> Hello Parav
> 
> > > -----Original Message-----
> > > From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> > > owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Parav Pandit
> > > Sent: Tuesday, October 10, 2017 5:44 PM
> > > To: joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org; apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org
> > > Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Parav
> > > Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; Brad Erickson <bradley-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > > Subject: [PATCH] checkpatch: Introduce check for format of Fixes
> > > line in commit log
> > >
> > > This patch introduces a format check for 'Fixes' line in commit log
> > > for 12 characters commit id and format for Fixes as ("...").
> 
> I think this doesn't handle case like:
> 
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58735

I see such commits now. I will cover for such an additional format.
Fixes: <link>
Will send v1.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-10-19  6:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-10 22:44 [PATCH] checkpatch: Introduce check for format of Fixes line in commit log Parav Pandit
     [not found] ` <1507675467-24316-1-git-send-email-parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-10-19  5:52   ` Parav Pandit
     [not found]     ` <VI1PR0502MB3008662D9D9D1BF80461C7CCD1420-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-10-19  5:57       ` Joe Perches
     [not found]         ` <1508392637.6806.33.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-10-19  6:11           ` Parav Pandit

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