Skip to content

Commit

Permalink
Migrate javafmtCheckSettings to project/Checkstyle
Browse files Browse the repository at this point in the history
Signed-off-by: Tai Le Manh <[email protected]>
  • Loading branch information
tlm365 committed Aug 22, 2024
1 parent c973da7 commit ebed6e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
5 changes: 0 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,6 @@ lazy val commonSettings = Seq(
unidocSourceFilePatterns := Nil,
)

// enforce java code style
def javafmtCheckSettings() = Seq(
(Compile / compile) := ((Compile / compile) dependsOn (Compile / javafmtCheckAll)).value
)

/**
* Note: we cannot access sparkVersion.value here, since that can only be used within a task or
* setting macro.
Expand Down
13 changes: 9 additions & 4 deletions project/Checkstyle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
* limitations under the License.
*/

import com.etsy.sbt.checkstyle.CheckstylePlugin.autoImport._
import org.scalastyle.sbt.ScalastylePlugin.autoImport._
import sbt._
import sbt.Keys._
import com.etsy.sbt.checkstyle.CheckstylePlugin.autoImport.*
import com.lightbend.sbt.JavaFormatterPlugin.autoImport.javafmtCheckAll
import org.scalastyle.sbt.ScalastylePlugin.autoImport.*
import sbt.*
import sbt.Keys.*

object Checkstyle {

Expand Down Expand Up @@ -100,4 +101,8 @@ object Checkstyle {
}
}

// Enforce java code style
lazy val javafmtCheckSettings = Seq(
(Compile / compile) := ((Compile / compile) dependsOn (Compile / javafmtCheckAll)).value
)
}

0 comments on commit ebed6e8

Please sign in to comment.