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 88    echo  "  ====== $@  ======" |  tee -a /dev/stderr
99}
1010
11- #  If it doesn't touch .py files, don't bother. Ignore created and  deleted.
12- if  !  git show --diff-filter=AM --pretty=" " |  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=" " " ${ HEAD} " |  grep -q -E " \.py$" 
1313then 
1414    echo  " No python scripts touched, skip" >& $DESC_FD 
1515    exit  0
@@ -28,7 +28,8 @@ git log -1 --pretty='%h ("%s")' HEAD
2828pr " Checking before the patch" 
2929git checkout -q HEAD~
3030
31- for  f  in  $( git show --diff-filter=M --pretty=" " |  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=" " " ${HEAD} " |  grep -E " \.py$" ) ;  do 
3233    pylint $f  |  tee -a $tmpfile_o 
3334done 
3435
@@ -38,7 +39,7 @@ incumbent_w=$(grep -i -c ": [WC][0-9][0-9][0-9][0-9]: " $tmpfile_o)
3839pr " Checking the tree with the patch" 
3940git checkout -q $HEAD 
4041
41- for  f  in  $( git show --diff-filter=AM --pretty=" " |  grep -E " \.py$" ) ;  do 
42+ for  f  in  $( git show --diff-filter=AM --pretty=" " " ${ HEAD} " |  grep -E " \.py$" ) ;  do 
4243    pylint $f  |  tee -a $tmpfile_n 
4344done 
4445
Original file line number Diff line number Diff line change 88    echo  "  ====== $@  ======" |  tee -a /dev/stderr
99}
1010
11- #  If it doesn't touch .sh files, don't bother. Ignore created and  deleted.
12- if  !  git show --diff-filter=AM --pretty=" " |  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=" " " ${ HEAD} " |  grep -q -E " \.sh$" 
1313then 
1414    echo  " No shell scripts touched, skip" >& $DESC_FD 
1515    exit  0
@@ -28,7 +28,8 @@ git log -1 --pretty='%h ("%s")' HEAD
2828pr " Checking before the patch" 
2929git checkout -q HEAD~
3030
31- for  f  in  $( git show --diff-filter=M --pretty=" " |  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=" " " ${HEAD} " |  grep -E " \.sh$" ) ;  do 
3233    (
3334	echo  " Checking $f " 
3435	echo 
@@ -45,7 +46,7 @@ incumbent_w=$(grep -i -c "SC[0-9]* (" $tmpfile_o)
4546pr " Building the tree with the patch" 
4647git checkout -q $HEAD 
4748
48- for  f  in  $( git show --diff-filter=AM --pretty=" " |  grep -E " \.sh$" ) ;  do 
49+ for  f  in  $( git show --diff-filter=AM --pretty=" " " ${ HEAD} " |  grep -E " \.sh$" ) ;  do 
4950    (
5051	echo  " Checking $f " 
5152	echo 
Original file line number Diff line number Diff line change 88    echo  "  ====== $@  ======" |  tee -a /dev/stderr
99}
1010
11- #  If it doesn't touch .yaml files, don't bother. Ignore created and  deleted.
12- if  !  git show --diff-filter=AM --pretty=" " |  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=" " " ${ HEAD} " |  grep -q -E " \.yaml$" 
1313then 
1414    echo  " No YAML files touched, skip" >& $DESC_FD 
1515    exit  0
@@ -28,7 +28,8 @@ git log -1 --pretty='%h ("%s")' HEAD
2828pr " Checking before the patch" 
2929git checkout -q HEAD~
3030
31- for  f  in  $( git show --diff-filter=M --pretty=" " |  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=" " " ${HEAD} " |  grep -E " \.yaml$" ) ;  do 
3233    yamllint $f  |  tee -a $tmpfile_o 
3334done 
3435
@@ -38,7 +39,7 @@ incumbent_w=$(grep -i -c " warning " $tmpfile_o)
3839pr " Checking the tree with the patch" 
3940git checkout -q $HEAD 
4041
41- for  f  in  $( git show --diff-filter=AM --pretty=" " |  grep -E " \.yaml$" ) ;  do 
42+ for  f  in  $( git show --diff-filter=AM --pretty=" " " ${ HEAD} " |  grep -E " \.yaml$" ) ;  do 
4243    yamllint $f  |  tee -a $tmpfile_n 
4344done 
4445
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments