[Qemu-devel] [PATCH for-4.0 0/4] Small checkpatch fixes and improvements

Paolo Bonzini posted 4 patches 5 years, 4 months ago
Test checkpatch failed
Test asan passed
Test docker-quick@centos7 passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20181129090120.28828-1-pbonzini@redhat.com
scripts/checkpatch.pl | 92 ++++++++++++++++++++++++++++++++++---------
1 file changed, 73 insertions(+), 19 deletions(-)
[Qemu-devel] [PATCH for-4.0 0/4] Small checkpatch fixes and improvements
Posted by Paolo Bonzini 5 years, 4 months ago
Right now, patchew has a small script around checkpatch to show
some feedback about which patches have problems.  The idea behind
this series is that patchew should be able to do just
"scripts/checkpatch.pl --mailback base..", and everything
should just work.

Paolo

Paolo Bonzini (4):
  checkpatch: fix premature exit when no input or --mailback
  checkpatch: check Signed-off-by in --mailback mode
  checkpatch: improve handling of multiple patches or files
  checkpatch: colorize output to terminal

 scripts/checkpatch.pl | 92 ++++++++++++++++++++++++++++++++++---------
 1 file changed, 73 insertions(+), 19 deletions(-)

-- 
2.19.1


Re: [Qemu-devel] [PATCH for-4.0 0/4] Small checkpatch fixes and improvements
Posted by no-reply@patchew.org 5 years, 4 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:



Type: series
Subject: [Qemu-devel] [PATCH for-4.0 0/4] Small checkpatch fixes and improvements
Message-id: 20181129090120.28828-1-pbonzini@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
82caf95 checkpatch: colorize output to terminal
df8393a checkpatch: improve handling of multiple patches or files
b98039a checkpatch: check Signed-off-by in --mailback mode
f2c33c2 checkpatch: fix premature exit when no input or --mailback

=== OUTPUT BEGIN ===
Checking PATCH 1/4: checkpatch: fix premature exit when no input or --mailback...
Checking PATCH 2/4: checkpatch: check Signed-off-by in --mailback mode...
Checking PATCH 3/4: checkpatch: improve handling of multiple patches or files...
ERROR: line over 90 characters
#33: FILE: scripts/checkpatch.pl:345:
+       open($HASH, "-|", "git", "log", "--reverse", "--no-merges", "--format=%H %s", $ARGV[0]) ||

ERROR: line over 90 characters
#34: FILE: scripts/checkpatch.pl:346:
+               die "$P: git log --reverse --no-merges --format='%H %s' $ARGV[0] failed - $!\n";

WARNING: line over 80 characters
#65: FILE: scripts/checkpatch.pl:373:
+               $vname = substr($hash, 0, 12) . ' (' . $git_commits{$hash} . ')';

total: 2 errors, 1 warnings, 62 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 4/4: checkpatch: colorize output to terminal...
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 114 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [Qemu-devel] [PATCH for-4.0 0/4] Small checkpatch fixes and improvements
Posted by no-reply@patchew.org 5 years, 4 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:



Type: series
Subject: [Qemu-devel] [PATCH for-4.0 0/4] Small checkpatch fixes and improvements
Message-id: 20181129090120.28828-1-pbonzini@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20181130192216.26987-1-richard.henderson@linaro.org -> patchew/20181130192216.26987-1-richard.henderson@linaro.org
Switched to a new branch 'test'
82caf95 checkpatch: colorize output to terminal
df8393a checkpatch: improve handling of multiple patches or files
b98039a checkpatch: check Signed-off-by in --mailback mode
f2c33c2 checkpatch: fix premature exit when no input or --mailback

=== OUTPUT BEGIN ===
Checking PATCH 1/4: checkpatch: fix premature exit when no input or --mailback...
Checking PATCH 2/4: checkpatch: check Signed-off-by in --mailback mode...
Checking PATCH 3/4: checkpatch: improve handling of multiple patches or files...
ERROR: line over 90 characters
#33: FILE: scripts/checkpatch.pl:345:
+       open($HASH, "-|", "git", "log", "--reverse", "--no-merges", "--format=%H %s", $ARGV[0]) ||

ERROR: line over 90 characters
#34: FILE: scripts/checkpatch.pl:346:
+               die "$P: git log --reverse --no-merges --format='%H %s' $ARGV[0] failed - $!\n";

WARNING: line over 80 characters
#65: FILE: scripts/checkpatch.pl:373:
+               $vname = substr($hash, 0, 12) . ' (' . $git_commits{$hash} . ')';

total: 2 errors, 1 warnings, 62 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 4/4: checkpatch: colorize output to terminal...
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 114 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com