Skip to content

Commit eeb8bfa

Browse files
committed
[SPARK-30534][INFRA] Use mvn in dev/scalastyle
1 parent 6e5b4bf commit eeb8bfa

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

dev/scalastyle

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,10 @@
1717
# limitations under the License.
1818
#
1919

20-
SPARK_PROFILES=${1:-"-Pmesos -Pkubernetes -Pyarn -Pspark-ganglia-lgpl -Pkinesis-asl -Phive-thriftserver -Phive"}
20+
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
2121

22-
# NOTE: echo "q" is needed because SBT prompts the user for input on encountering a build file
23-
# with failure (either resolution or compilation); the "q" makes SBT quit.
24-
ERRORS=$(echo -e "q\n" \
25-
| build/sbt \
26-
${SPARK_PROFILES} \
27-
-Pdocker-integration-tests \
28-
-Pkubernetes-integration-tests \
29-
scalastyle test:scalastyle \
30-
| awk '{if($1~/error/)print}' \
31-
)
22+
SPARK_PROFILES=${1:-"-Pmesos -Pkubernetes -Pyarn -Pspark-ganglia-lgpl -Pkinesis-asl -Phive-thriftserver -Phive -Pdocker-integration-tests -Pkubernetes-integration-tests"}
23+
ERRORS=$($SCRIPT_DIR/../build/mvn $SPARK_PROFILES scalastyle:check | grep "^error file")
3224

3325
if test ! -z "$ERRORS"; then
3426
echo -e "Scalastyle checks failed at following occurrences:\n$ERRORS"

0 commit comments

Comments
 (0)