Skip to content

Commit

Permalink
chore(format): add in formatting to build and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ckipp01 committed Apr 8, 2023
1 parent eaddef6 commit c137ad5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Introduce scalafmt
7a32dde8ef120673a30f22512b191d6706cc70f1
14 changes: 14 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ jobs:
- name: Check Binary Compatibility
run: ./mill -i --disable-ticker __.mimaReportBinaryIssues

check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17

- run: ./mill -i -k __.checkFormat

publish-sonatype:
if: github.repository == 'com-lihaoyi/scalatags' && contains(github.ref, 'refs/tags/')
needs: test
Expand Down
3 changes: 2 additions & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import de.tobiasroeser.mill.vcs.version.VcsVersion
import $ivy.`com.github.lolgab::mill-mima::0.0.13`
import com.github.lolgab.mill.mima._
import mill.scalalib.api.Util.isScala3
import mill.scalalib.scalafmt._

val dottyVersions = sys.props.get("dottyVersion").toList

Expand Down Expand Up @@ -41,7 +42,7 @@ trait ScalatagsPublishModule extends PublishModule with MimaCheck {
)
}

trait Common extends CrossScalaModule {
trait Common extends CrossScalaModule with ScalafmtModule {
def millSourcePath = super.millSourcePath / offset
def ivyDeps = Agg(
ivy"com.lihaoyi::sourcecode::0.3.0",
Expand Down
10 changes: 2 additions & 8 deletions scalatags/test/src/scalatags/generic/StyleSheetTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ abstract class StyleSheetTests[Builder, Output <: FragT, FragT](val bundle: Bund
"""
)
}
<<<<<<< HEAD
test("defs"){

test("defs") {
check(
Defs.styleSheetText,
s"""
Expand All @@ -197,16 +197,10 @@ abstract class StyleSheetTests[Builder, Output <: FragT, FragT](val bundle: Bund
"""
)
}
test("failure"){
test("noDirectInstantiation"){
// This doesn't seem to work, even though that snippet does indeed
// cause a compilation error. Maybe a bug in uTest?
=======
test("failure") {
test("noDirectInstantiation") {
// This doesn't seem to work, even though that snippet does indeed
// cause a compilation error. Maybe a bug in uTest?
>>>>>>> 7a32dde (chore(format): format all the things)

// compileError("""
// object Funky extends StyleSheet
Expand Down

0 comments on commit c137ad5

Please sign in to comment.