aboutsummaryrefslogtreecommitdiff
path: root/dev/scalastyle
diff options
context:
space:
mode:
authorPrashant Sharma <prashant.s@imaginea.com>2014-03-29 23:03:03 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-03-29 23:03:03 -0700
commitdf1b9f7b1a07bf8d806695a7684f9d69bf705093 (patch)
tree6591e63c787a9698271d0777e6fad15308774e20 /dev/scalastyle
parent2861b07bb030f72769f5b757b4a7d4a635807140 (diff)
downloadspark-df1b9f7b1a07bf8d806695a7684f9d69bf705093.tar.gz
spark-df1b9f7b1a07bf8d806695a7684f9d69bf705093.tar.bz2
spark-df1b9f7b1a07bf8d806695a7684f9d69bf705093.zip
SPARK-1336 Reducing the output of run-tests script.
Author: Prashant Sharma <prashant.s@imaginea.com> Author: Prashant Sharma <scrapcodes@gmail.com> Closes #262 from ScrapCodes/SPARK-1336/ReduceVerbosity and squashes the following commits: 87dfa54 [Prashant Sharma] Further reduction in noise and made pyspark tests to fail fast. 811170f [Prashant Sharma] Reducing the ouput of run-tests script.
Diffstat (limited to 'dev/scalastyle')
-rwxr-xr-xdev/scalastyle27
1 files changed, 27 insertions, 0 deletions
diff --git a/dev/scalastyle b/dev/scalastyle
new file mode 100755
index 0000000000..5a18f4d672
--- /dev/null
+++ b/dev/scalastyle
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+sbt/sbt clean scalastyle > scalastyle.txt
+ERRORS=$(cat scalastyle.txt | grep -e "error file")
+if test ! -z "$ERRORS"; then
+ echo -e "Scalastyle checks failed at following occurrences:\n$ERRORS"
+ exit 1
+else
+ echo -e "Scalastyle checks passed.\n"
+fi