aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/check_style.sh
diff options
context:
space:
mode:
authorChris Purta <cpurta@kochava.com>2018-11-15 07:05:20 +0800
committerchriseth <chris@ethereum.org>2018-11-26 22:43:17 +0800
commit5c67821af48c307d4b3da9b0cc50b4d447e8eae2 (patch)
tree16e039fc2b572eb84de69178b8238584fcda26bd /scripts/check_style.sh
parentf1cebed998cd805cec3f37d42a18f3632399b866 (diff)
downloaddexon-solidity-5c67821af48c307d4b3da9b0cc50b4d447e8eae2.tar
dexon-solidity-5c67821af48c307d4b3da9b0cc50b4d447e8eae2.tar.gz
dexon-solidity-5c67821af48c307d4b3da9b0cc50b4d447e8eae2.tar.bz2
dexon-solidity-5c67821af48c307d4b3da9b0cc50b4d447e8eae2.tar.lz
dexon-solidity-5c67821af48c307d4b3da9b0cc50b4d447e8eae2.tar.xz
dexon-solidity-5c67821af48c307d4b3da9b0cc50b4d447e8eae2.tar.zst
dexon-solidity-5c67821af48c307d4b3da9b0cc50b4d447e8eae2.zip
Script that directly comments errors to the github pull request.
Diffstat (limited to 'scripts/check_style.sh')
-rwxr-xr-xscripts/check_style.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/check_style.sh b/scripts/check_style.sh
index 4f716d66..171867f9 100755
--- a/scripts/check_style.sh
+++ b/scripts/check_style.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+. scripts/report_errors.sh
+
(
REPO_ROOT="$(dirname "$0")"/..
cd $REPO_ROOT
@@ -8,8 +10,8 @@ WHITESPACE=$(git grep -n -I -E "^.*[[:space:]]+$" | grep -v "test/libsolidity/AS
if [[ "$WHITESPACE" != "" ]]
then
- echo "Error: Trailing whitespace found:" >&2
- echo "$WHITESPACE" >&2
+ echo "Error: Trailing whitespace found:" | tee -a $ERROR_LOG
+ echo "$WHITESPACE" | tee -a $ERROR_LOG
exit 1
fi
@@ -22,8 +24,8 @@ git grep -nIE "\<if\>\s*\(.*\)\s*\{\s*$" -- '*.h' '*.cpp'
if [[ "$FORMATERROR" != "" ]]
then
- echo "Error: Format error for if/for:" >&2
- echo "$FORMATERROR" >&2
+ echo "Error: Format error for if/for:" | tee -a $ERROR_LOG
+ echo "$FORMATERROR" | tee -a $ERROR_LOG
exit 1
fi
)