Skip to content

Commit

Permalink
switch from --test to new --list format
Browse files Browse the repository at this point in the history
As requested in scalameta/scalafmt#1459, and
introduced in scalameta/scalafmt#1466, which was
release in v2.0.1 which we pinned to in previous commit.  Yay!
  • Loading branch information
mroth committed Aug 12, 2019
1 parent 8d74800 commit 6614132
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ LABEL "repository"="https://github.com/openlawteam/scalafmt-ci"
LABEL "homepage"="https://github.com/openlawteam/scalafmt-ci"
LABEL "maintainer"="Matthew Rothenberg <mroth@openlaw.io>"

ENTRYPOINT ["/app/scalafmt", "--non-interactive", "--test"]
ENTRYPOINT ["/app/scalafmt", "--non-interactive", "--list"]
# by default, github actions will set WORKDIR to $GITHUB_WORKSPACE
# (/github/workspace), so no need to set CMD here
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ IMAGE = openlaw/scalafmt-ci
WORKDIR = /github/workspace
TESTDATA = .github/testdata

.PHONY: image test testdata clean
.PHONY: image test testfail testdata clean

image:
docker build -t $(IMAGE) .
Expand All @@ -13,6 +13,11 @@ test:
-w=$(WORKDIR) \
$(IMAGE) --exclude Bad.scala

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

# generate the "good" version of the sample file
$(TESTDATA)/Good.scala: $(TESTDATA)/Bad.scala $(TESTDATA)/.scalafmt.conf
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Scalafmt GitHub Action

Runs `scalafmt --test` on your repository automatically with every push.
Runs `scalafmt --list` on your repository automatically with every push.

Uses [scalafmt-native](https://github.com/mroth/scalafmt-native) under the hood to keep things small and booting super quick by avoiding the JVM.

Expand Down

0 comments on commit 6614132

Please sign in to comment.