devtools: check coverity and bugzilla tags

Message ID 1570549949-17825-1-git-send-email-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series devtools: check coverity and bugzilla tags |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-compilation success Compile Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

David Marchand Oct. 8, 2019, 3:52 p.m. UTC
  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(+)
  

Comments

Kevin Traynor Oct. 9, 2019, 1:43 p.m. UTC | #1
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: ' ||
>
  
Thomas Monjalon Nov. 27, 2019, 11:33 p.m. UTC | #2
09/10/2019 15:43, Kevin Traynor:
> 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>

Applied, thanks
  

Patch

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: ' ||