File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 22
33set -e
44
5+ script_folder=` dirname $0 `
6+
57if [[ " $# " -ne 2 ]]
68then
79 echo " Script for running the CPP linter only on modified lines."
1214 exit 1
1315fi
1416
15- if ! [[ -e scripts /cpplint.py ]]
17+ if ! [[ -e $script_folder /cpplint.py ]]
1618then
17- echo " Lint script could not be found in the scripts directory"
18- echo " Ensure cpplint.py is inside the scripts directory then run again"
19+ echo " Lint script could not be found in the $script_folder directory"
20+ echo " Ensure cpplint.py is inside the $script_folder directory then run again"
1921 exit 1
2022fi
2123
@@ -81,7 +83,7 @@ for file in $diff_files; do
8183 # Run the linting script and filter by the filter we've build
8284 # of all the modified lines
8385 # The errors from the linter go to STDERR so must be redirected to STDOUT
84- result=` python scripts /cpplint.py $file 2>&1 | { grep -E " $lint_grep_filter " || true ; }`
86+ result=` python $script_folder /cpplint.py $file 2>&1 | { grep -E " $lint_grep_filter " || true ; }`
8587
8688 # Providing some errors were relevant we print them out
8789 if [ " $result " ]
You can’t perform that action at this time.
0 commit comments