File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 8
8
echo " ====== $@ ======" | tee -a /dev/stderr
9
9
}
10
10
11
- # If it doesn't touch .py files, don't bother. Ignore created and deleted.
12
- if ! git show --diff-filter=AM --pretty=" " --name-only HEAD | grep -q -E " \.py$"
11
+ # If it doesn't touch .py files, don't bother. Ignore deleted.
12
+ if ! git show --diff-filter=AM --pretty=" " --name-only " ${ HEAD} " | grep -q -E " \.py$"
13
13
then
14
14
echo " No python scripts touched, skip" >& $DESC_FD
15
15
exit 0
@@ -28,7 +28,8 @@ git log -1 --pretty='%h ("%s")' HEAD
28
28
pr " Checking before the patch"
29
29
git checkout -q HEAD~
30
30
31
- for f in $( git show --diff-filter=M --pretty=" " --name-only HEAD | grep -E " \.py$" ) ; do
31
+ # Also ignore created, as not present in the parent commit
32
+ for f in $( git show --diff-filter=M --pretty=" " --name-only " ${HEAD} " | grep -E " \.py$" ) ; do
32
33
pylint $f | tee -a $tmpfile_o
33
34
done
34
35
@@ -38,7 +39,7 @@ incumbent_w=$(grep -i -c ": [WC][0-9][0-9][0-9][0-9]: " $tmpfile_o)
38
39
pr " Checking the tree with the patch"
39
40
git checkout -q $HEAD
40
41
41
- for f in $( git show --diff-filter=AM --pretty=" " --name-only HEAD | grep -E " \.py$" ) ; do
42
+ for f in $( git show --diff-filter=AM --pretty=" " --name-only " ${ HEAD} " | grep -E " \.py$" ) ; do
42
43
pylint $f | tee -a $tmpfile_n
43
44
done
44
45
Original file line number Diff line number Diff line change 8
8
echo " ====== $@ ======" | tee -a /dev/stderr
9
9
}
10
10
11
- # If it doesn't touch .sh files, don't bother. Ignore created and deleted.
12
- if ! git show --diff-filter=AM --pretty=" " --name-only HEAD | grep -q -E " \.sh$"
11
+ # If it doesn't touch .sh files, don't bother. Ignore deleted.
12
+ if ! git show --diff-filter=AM --pretty=" " --name-only " ${ HEAD} " | grep -q -E " \.sh$"
13
13
then
14
14
echo " No shell scripts touched, skip" >& $DESC_FD
15
15
exit 0
@@ -28,7 +28,8 @@ git log -1 --pretty='%h ("%s")' HEAD
28
28
pr " Checking before the patch"
29
29
git checkout -q HEAD~
30
30
31
- for f in $( git show --diff-filter=M --pretty=" " --name-only HEAD | grep -E " \.sh$" ) ; do
31
+ # Also ignore created, as not present in the parent commit
32
+ for f in $( git show --diff-filter=M --pretty=" " --name-only " ${HEAD} " | grep -E " \.sh$" ) ; do
32
33
(
33
34
echo " Checking $f "
34
35
echo
@@ -45,7 +46,7 @@ incumbent_w=$(grep -i -c "SC[0-9]* (" $tmpfile_o)
45
46
pr " Building the tree with the patch"
46
47
git checkout -q $HEAD
47
48
48
- for f in $( git show --diff-filter=AM --pretty=" " --name-only HEAD | grep -E " \.sh$" ) ; do
49
+ for f in $( git show --diff-filter=AM --pretty=" " --name-only " ${ HEAD} " | grep -E " \.sh$" ) ; do
49
50
(
50
51
echo " Checking $f "
51
52
echo
Original file line number Diff line number Diff line change 8
8
echo " ====== $@ ======" | tee -a /dev/stderr
9
9
}
10
10
11
- # If it doesn't touch .yaml files, don't bother. Ignore created and deleted.
12
- if ! git show --diff-filter=AM --pretty=" " --name-only HEAD | grep -q -E " \.yaml$"
11
+ # If it doesn't touch .yaml files, don't bother. Ignore deleted.
12
+ if ! git show --diff-filter=AM --pretty=" " --name-only " ${ HEAD} " | grep -q -E " \.yaml$"
13
13
then
14
14
echo " No YAML files touched, skip" >& $DESC_FD
15
15
exit 0
@@ -28,7 +28,8 @@ git log -1 --pretty='%h ("%s")' HEAD
28
28
pr " Checking before the patch"
29
29
git checkout -q HEAD~
30
30
31
- for f in $( git show --diff-filter=M --pretty=" " --name-only HEAD | grep -E " \.yaml$" ) ; do
31
+ # Also ignore created, as not present in the parent commit
32
+ for f in $( git show --diff-filter=M --pretty=" " --name-only " ${HEAD} " | grep -E " \.yaml$" ) ; do
32
33
yamllint $f | tee -a $tmpfile_o
33
34
done
34
35
@@ -38,7 +39,7 @@ incumbent_w=$(grep -i -c " warning " $tmpfile_o)
38
39
pr " Checking the tree with the patch"
39
40
git checkout -q $HEAD
40
41
41
- for f in $( git show --diff-filter=AM --pretty=" " --name-only HEAD | grep -E " \.yaml$" ) ; do
42
+ for f in $( git show --diff-filter=AM --pretty=" " --name-only " ${ HEAD} " | grep -E " \.yaml$" ) ; do
42
43
yamllint $f | tee -a $tmpfile_n
43
44
done
44
45
You can’t perform that action at this time.
0 commit comments