We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b0295e commit d8a7addCopy full SHA for d8a7add
contrib/devtools/lint-whitespace.sh
@@ -12,14 +12,14 @@ if [ -z "${TRAVIS_COMMIT_RANGE}" ]; then
12
fi
13
14
showdiff() {
15
- if ! git diff "${TRAVIS_COMMIT_RANGE}" --; then
+ if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" --; then
16
echo "Failed to get a diff"
17
exit 1
18
19
}
20
21
# Do a first pass, and if no trailing whitespace was found then exit early.
22
-if ! showdiff | egrep -q '^\+.*\s+$'; then
+if ! showdiff | grep -E -q '^\+.*\s+$'; then
23
exit
24
25
@@ -43,5 +43,5 @@ while read -r line; do
43
44
echo "$line"
45
46
-done < <(showdiff | egrep '^(diff --git |\+.*\s+$)')
+done < <(showdiff | grep -E '^(diff --git |\+.*\s+$)')
47
0 commit comments