Skip to content

Commit

Permalink
Revert "[SPARK-30534][INFRA] Use mvn in dev/scalastyle"
Browse files Browse the repository at this point in the history
This reverts commit ac54156.
  • Loading branch information
HyukjinKwon committed Jan 22, 2020
1 parent ebaa6fe commit 90dea83
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
19 changes: 15 additions & 4 deletions dev/scalastyle
Expand Up @@ -17,10 +17,21 @@
# limitations under the License.
#

SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"

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

if test ! -z "$ERRORS"; then
echo -e "Scalastyle checks failed at following occurrences:\n$ERRORS"
Expand Down
Expand Up @@ -154,7 +154,7 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSQLCo
// A value with fractions from DECIMAL(3, 2) is correct:
assert(row.getDecimal(1).compareTo(BigDecimal.valueOf(1.23)) == 0)
// A value > Int.MaxValue from DECIMAL(10) is correct:
assert(row.getDecimal(2).compareTo(BigDecimal.valueOf(9999999999L)) == 0)
assert(row.getDecimal(2).compareTo(BigDecimal.valueOf(9999999999l)) == 0)
}


Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -2558,7 +2558,7 @@
<configuration>
<verbose>false</verbose>
<failOnViolation>true</failOnViolation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<failOnWarning>false</failOnWarning>
<sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
<testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
Expand Down

0 comments on commit 90dea83

Please sign in to comment.