Skip to content

Add in Scalafmt #344

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

Merged
merged 1 commit into from
May 6, 2021
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
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:

jobs:
scala:
test:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -27,5 +27,23 @@ jobs:
distribution: 'adopt'
java-version: ${{ matrix.java }}

- name: run tests
- name: Run tests
run: sbt scripted

formatting:
runs-on: ubuntu-latest

steps:
- name: checkout the repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up JVM
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'

- name: Check Formatting
run: sbt scalafmtCheckAll
1 change: 1 addition & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = "2.7.5"
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name := "sbt-scoverage"

import sbt.ScriptedPlugin.autoImport.scriptedLaunchOpts

def isCI = System.getenv("CI") != null
def scoverageVersion = "1.4.5"

inThisBuild(
Expand Down Expand Up @@ -35,7 +34,7 @@ lazy val root = Project("sbt-scoverage", file("."))
.settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % scalaVersion.value % Compile,
"org.scoverage" %% "scalac-scoverage-plugin" % scoverageVersion cross (CrossVersion.full),
"org.scoverage" %% "scalac-scoverage-plugin" % scoverageVersion cross (CrossVersion.full)
),
buildInfoKeys := Seq[BuildInfoKey]("scoverageVersion" -> scoverageVersion),
buildInfoPackage := "scoverage",
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
6 changes: 5 additions & 1 deletion src/main/scala/scoverage/ScoverageKeys.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ package scoverage
import sbt._

object ScoverageKeys {
lazy val coverageEnabled = settingKey[Boolean]("controls whether code instrumentation is enabled or not")
// format: off
lazy val coverageEnabled = settingKey[Boolean](
"controls whether code instrumentation is enabled or not"
)
lazy val coverageReport = taskKey[Unit]("run report generation")
lazy val coverageAggregate = taskKey[Unit]("aggregate reports from subprojects")
lazy val coverageExcludedPackages = settingKey[String]("regex for excluded packages")
Expand All @@ -17,4 +20,5 @@ object ScoverageKeys {
lazy val coverageOutputDebug = settingKey[Boolean]("turn on the debug report")
lazy val coverageOutputTeamCity = settingKey[Boolean]("turn on teamcity reporting")
lazy val coverageScalacPluginVersion = settingKey[String]("version of scalac-scoverage-plugin to use")
// format: on
}
Loading