Skip to content

Commit

Permalink
Merge pull request #2 from openlawteam/bump-scalafmt-native
Browse files Browse the repository at this point in the history
bump scalafmt-native
  • Loading branch information
mroth authored Dec 3, 2019
2 parents 1bf9fba + 7b5ebf2 commit e38fb1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/testdata/Good.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ messiness added to it. -mroth */
package org.scalafmt

sealed abstract class Formatted {

def toEither: Either[Throwable, String] = this match {
case Formatted.Success(s) => Right(s)
case Formatted.Failure(e) => Left(e) // too much space before comment
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is essentially just scalafmt-native loaded into an alpine container, so
# that we have a shell present to expand wildcards etc.
FROM mrothy/scalafmt-native:2.0.1 as scalafmt-native
FROM mrothy/scalafmt-native:2.2.2 as scalafmt-native

FROM alpine:latest
LABEL "repository"="https://github.com/openlawteam/scalafmt-ci"
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ image:
test:
docker run --rm -it \
-w=$(WORKDIR) \
-v "$$(pwd)/.github/testdata":$(WORKDIR) \
-v "$$(pwd)/$(TESTDATA)":$(WORKDIR) \
$(IMAGE) --list --exclude Bad.scala

# expected failure, to see output
testfail:
docker run --rm -it \
-w=$(WORKDIR) \
-v "$$(pwd)/.github/testdata":$(WORKDIR) \
-v "$$(pwd)/$(TESTDATA)":$(WORKDIR) \
$(IMAGE) --list

# generate the "good" version of the sample file
$(TESTDATA)/Good.scala: $(TESTDATA)/Bad.scala $(TESTDATA)/.scalafmt.conf
docker run --rm -i \
mrothy/scalafmt-native \
--config $(TESTDATA)/.scalafmt.conf \
-v "$$(pwd)/$(TESTDATA)":/conf \
mrothy/scalafmt-native:2.2.2 \
--config /conf/.scalafmt.conf \
--stdin --stdout \
< $< > $@

Expand Down

0 comments on commit e38fb1a

Please sign in to comment.