Skip to content

Commit

Permalink
move unused-import check to sbt only
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciferYang committed Nov 20, 2020
1 parent 883a213 commit a92c80d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
<commons.collections.version>3.2.2</commons.collections.version>
<scala.version>2.12.10</scala.version>
<scala.binary.version>2.12</scala.binary.version>
<scalac.arg.unused-imports>-Ywarn-unused-import</scalac.arg.unused-imports>
<scalatest-maven-plugin.version>2.0.0</scalatest-maven-plugin.version>
<scalafmt.parameters>--test</scalafmt.parameters>
<!-- for now, not running scalafmt as part of default verify pipeline -->
Expand Down Expand Up @@ -2538,7 +2537,6 @@
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-explaintypes</arg>
<arg>${scalac.arg.unused-imports}</arg>
<arg>-target:jvm-1.8</arg>
</args>
<jvmArgs>
Expand Down Expand Up @@ -3262,13 +3260,12 @@
</pluginManagement>
</build>
</profile>

<profile>
<id>scala-2.13</id>
<properties>
<scala.version>2.13.3</scala.version>
<scala.binary.version>2.13</scala.binary.version>
<scalac.arg.unused-imports>-Wconf:cat=unused-imports:e</scalac.arg.unused-imports>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
2 changes: 2 additions & 0 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ object SparkBuild extends PomBuild {
Seq(
"-Xfatal-warnings",
"-deprecation",
"Ywarn-unused-import",
"-P:silencer:globalFilters=.*deprecated.*" //regex to catch deprecation warnings and supress them
)
} else {
Expand All @@ -230,6 +231,7 @@ object SparkBuild extends PomBuild {
// see `scalac -Wconf:help` for details
"-Wconf:cat=deprecation:wv,any:e",
// 2.13-specific warning hits to be muted (as narrowly as possible) and addressed separately
"-Wconf:cat=unused-imports:e",
"-Wconf:cat=lint-multiarg-infix:wv",
"-Wconf:cat=other-nullary-override:wv",
"-Wconf:cat=other-match-analysis&site=org.apache.spark.sql.catalyst.catalog.SessionCatalog.lookupFunction.catalogFunction:wv",
Expand Down

0 comments on commit a92c80d

Please sign in to comment.