Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 maintainer-tools] dim: Avoid false positives with BUG detection
Date: Mon, 21 Mar 2016 10:37:24 +0100	[thread overview]
Message-ID: <20160321093724.GK28483@phenom.ffwll.local> (raw)
In-Reply-To: <1458301932-17148-1-git-send-email-tvrtko.ursulin@linux.intel.com>

On Fri, Mar 18, 2016 at 11:52:12AM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Makes sure that the diff line adding the BUG is not immediately
> preceded by the diff line removing the BUG. Or in other words,
> avoids false positives when existing BUG is edited.
> 
> v2: Sent the incomplete version out...
> 
> v3: Rebase.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>

Ack, please push.
-Daniel

> ---
>  dim | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/dim b/dim
> index 67671de198a0..2d03acd8329b 100755
> --- a/dim
> +++ b/dim
> @@ -681,11 +681,13 @@ function dim_conf
>  function checkpatch_commit
>  {
>  	local commit=$1
> +	local cmd="git show --pretty=email $commit"
>  
>  	git --no-pager log --oneline -1 $commit
> -	git show $commit --pretty=email | scripts/checkpatch.pl -q --emacs --strict - || true
> +	$cmd | scripts/checkpatch.pl -q --emacs --strict - || true
>  
> -	if git show $commit --pretty=email | grep '^\+.*\WBUG' > /dev/null; then
> +	local bug_lines=$($cmd | grep -m 1 -B 1 '^\+.*\WBUG' | grep -c '^[+-].*\WBUG')
> +	if test "$bug_lines" -eq 1; then
>  		warn_or_fail "New BUG macro added"
>  	fi
>  }
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-03-21  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 11:52 [PATCH v3 maintainer-tools] dim: Avoid false positives with BUG detection Tvrtko Ursulin
2016-03-21  9:37 ` Daniel Vetter [this message]
2016-03-21  9:57   ` Tvrtko Ursulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160321093724.GK28483@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=tvrtko.ursulin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox