DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] devtools: check coverity and bugzilla tags
@ 2019-10-08 15:52 David Marchand
  2019-10-09 13:43 ` Kevin Traynor
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2019-10-08 15:52 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon

Let's try to check for discrepancies in covery and bugzilla tags.
The contributing guide specifies that:
- for coverity issues, the tag is 'Coverity issue:'
- for bugzilla issues, the tag is 'Bugzilla ID:'

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-git-log.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index a763ccf..2766957 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -161,6 +161,24 @@ bad=$(echo "$tags" |
 	sed 's,^.,\t&,')
 [ -z "$bad" ] || printf "Wrong tag:\n$bad\n"
 
+# check missing Coverity issue: tag
+bad=$(for commit in $commits; do
+	body=$(git log --format='%b' -1 $commit)
+	echo "$body" |grep -qi coverity || continue
+	echo "$body" |grep -q '^Coverity issue:' && continue
+	git log --format='\t%s' -1 $commit
+done)
+[ -z "$bad" ] || printf "Missing 'Coverity issue:' tag:\n$bad\n"
+
+# check missing Bugzilla ID: tag
+bad=$(for commit in $commits; do
+	body=$(git log --format='%b' -1 $commit)
+	echo "$body" |grep -qi bugzilla || continue
+	echo "$body" |grep -q '^Bugzilla ID:' && continue
+	git log --format='\t%s' -1 $commit
+done)
+[ -z "$bad" ] || printf "Missing 'Bugzilla ID:' tag:\n$bad\n"
+
 # check missing Fixes: tag
 bad=$(for fix in $fixes ; do
 	git log --format='%b' -1 $fix | grep -q '^Fixes: ' ||
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH] devtools: check coverity and bugzilla tags
  2019-10-08 15:52 [dpdk-dev] [PATCH] devtools: check coverity and bugzilla tags David Marchand
@ 2019-10-09 13:43 ` Kevin Traynor
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Traynor @ 2019-10-09 13:43 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: Thomas Monjalon

On 08/10/2019 16:52, David Marchand wrote:
> Let's try to check for discrepancies in covery and bugzilla tags.

s/covery/coverity/ - you are trying to fool your patch? :-)

> The contributing guide specifies that:
> - for coverity issues, the tag is 'Coverity issue:'
> - for bugzilla issues, the tag is 'Bugzilla ID:'
> 

Self tested:
$ ./devtools/check-git-log.sh
Missing 'Coverity issue:' tag:
	devtools: check coverity and bugzilla tags
Missing 'Bugzilla ID:' tag:
	devtools: check coverity and bugzilla tags

with typo fix,
Acked-by: Kevin Traynor <ktraynor@redhat.com>

> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  devtools/check-git-log.sh | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
> index a763ccf..2766957 100755
> --- a/devtools/check-git-log.sh
> +++ b/devtools/check-git-log.sh
> @@ -161,6 +161,24 @@ bad=$(echo "$tags" |
>  	sed 's,^.,\t&,')
>  [ -z "$bad" ] || printf "Wrong tag:\n$bad\n"
>  
> +# check missing Coverity issue: tag
> +bad=$(for commit in $commits; do
> +	body=$(git log --format='%b' -1 $commit)
> +	echo "$body" |grep -qi coverity || continue
> +	echo "$body" |grep -q '^Coverity issue:' && continue
> +	git log --format='\t%s' -1 $commit
> +done)
> +[ -z "$bad" ] || printf "Missing 'Coverity issue:' tag:\n$bad\n"
> +
> +# check missing Bugzilla ID: tag
> +bad=$(for commit in $commits; do
> +	body=$(git log --format='%b' -1 $commit)
> +	echo "$body" |grep -qi bugzilla || continue
> +	echo "$body" |grep -q '^Bugzilla ID:' && continue
> +	git log --format='\t%s' -1 $commit
> +done)
> +[ -z "$bad" ] || printf "Missing 'Bugzilla ID:' tag:\n$bad\n"
> +
>  # check missing Fixes: tag
>  bad=$(for fix in $fixes ; do
>  	git log --format='%b' -1 $fix | grep -q '^Fixes: ' ||
> 


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 15:52 [dpdk-dev] [PATCH] devtools: check coverity and bugzilla tags David Marchand
2019-10-09 13:43 ` Kevin Traynor

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox