Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace scalafmtOnCompile with CI check #457

Merged
merged 1 commit into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
if: ${{ matrix.jobtype == 1 }}
shell: bash
run: |
sbt -v -Dfile.encoding=UTF8 scalafmtCheckAll +test +packagedArtifacts
sbt -v -Dfile.encoding=UTF8 +test +packagedArtifacts
23 changes: 23 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Scalafmt

permissions: {}

on:
pull_request:
branches: ['**']

jobs:
build:
name: Code is formatted
runs-on: ubuntu-latest
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Check project is formatted
uses: jrouly/scalafmt-native-action@v3
with:
arguments: '--list'
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.7.4
version = 3.8.3
maxColumn = 100
mdedetrich marked this conversation as resolved.
Show resolved Hide resolved
project.git = true
project.excludeFilters = [ /sbt-test/, /input_sources/, /contraband-scala/ ]
Expand Down
3 changes: 0 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ ThisBuild / scmInfo := {
Some(ScmInfo(url(s"https://github.com/$slug"), s"git@github.com:$slug.git"))
}
ThisBuild / licenses := List(("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")))
ThisBuild / scalafmtOnCompile := true
eed3si9n marked this conversation as resolved.
Show resolved Hide resolved
ThisBuild / developers := List(
Developer("harrah", "Mark Harrah", "@harrah", url("https://github.com/harrah")),
Developer("eed3si9n", "Eugene Yokota", "@eed3si9n", url("http://eed3si9n.com/")),
Expand Down Expand Up @@ -67,8 +66,6 @@ def commonSettings: Seq[Setting[_]] = Def.settings(
inCompileAndTest(
(console / scalacOptions) --= Vector("-Ywarn-unused-import", "-Ywarn-unused", "-Xlint")
),
scalafmtOnCompile := true,
Test / scalafmtOnCompile := true,
Compile / publishArtifact := true,
Test / publishArtifact := false,
Test / parallelExecution := false
Expand Down
Loading