Skip to content

Commit f834dcb

Browse files
committed
scalafmt: use sbt plugin, add to tests workflow
The formatting test will be failing until format is fixed, but for now so are some other tests. Remove `bin/scalafmt` which no longer works.
1 parent 08be778 commit f834dcb

4 files changed

Lines changed: 13 additions & 18 deletions

File tree

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@ jobs:
2222
- name: Run tests
2323
run: |
2424
nix-shell --command "sbt -DSnippetsContainerTest.mongo=true cachedCiTest"
25+
formatting:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: cachix/install-nix-action@v24
30+
with:
31+
nix_path: nixpkgs=channel:nixos-22.11
32+
- name: Check formatting
33+
run: |
34+
nix-shell --command "sbt scalafmtCheckAll"

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ open `http://localhost:9000`
6060

6161
## Scalafmt
6262

63-
Make sure to run `bin/scalafmt` to format your code.
63+
Make sure to run `sbt scalafmtAll` to format your code.
6464

6565
You can install a pre-commit hook with `bin/hooks.sh`
6666

bin/scalafmt

Lines changed: 0 additions & 17 deletions
This file was deleted.

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.4")
2+
13
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.5")
24
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
35
addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0")

0 commit comments

Comments
 (0)