diff --git a/.circleci/config.yml b/.circleci/config.yml index 752129a6..5459e2ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - codacy: codacy/base@9.0.0 + codacy: codacy/base@9.3.3 references: circleci_job: &circleci_job diff --git a/build.sbt b/build.sbt index 9c598946..8095a3be 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,3 @@ -import codacy.libs._ - inThisBuild( Seq( scalaVersion := "2.12.11", @@ -25,18 +23,21 @@ libraryDependencies ++= Seq( ) // Test dependencies -libraryDependencies ++= Seq(scalatest % "it,test", mockitoScalaScalatest % Test) +libraryDependencies ++= Seq( + "org.scalatest" %% "scalatest" % "3.0.8" % "it,test", + "org.mockito" %% "mockito-scala-scalatest" % "1.7.1" % Test +) configs(IntegrationTest) Defaults.itSettings -mainClass in assembly := Some("com.codacy.CodacyCoverageReporter") -assemblyMergeStrategy in assembly := { +assembly / mainClass := Some("com.codacy.CodacyCoverageReporter") +assembly / assemblyMergeStrategy := { case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard case m if m.toLowerCase.matches("meta-inf.*\\.sf$") => MergeStrategy.discard case _ => MergeStrategy.first } -test in assembly := {} +assembly / test := {} crossPaths := false // HACK: Since we are only using the public resolvers we need to remove the private for it to not fail @@ -53,8 +54,8 @@ scmInfo := Some( ) ) -fork in Test := true -cancelable in Global := true +Test / fork := true +Global / cancelable := true javacOptions ++= Seq("-source", "11", "-target", "11") @@ -87,7 +88,7 @@ lazy val coverageParser = project "com.codacy" %% "codacy-api-scala" % "7.0.3", "com.codacy" %% "codacy-plugins-api" % "5.2.0", "org.scala-lang.modules" %% "scala-xml" % "1.2.0", - scalatest % Test + "org.scalatest" %% "scalatest" % "3.0.8" % Test ) ) diff --git a/docs/images/coverage-pr-commits.png b/docs/images/coverage-pr-commits.png index 4fcefb5e..9828ff67 100644 Binary files a/docs/images/coverage-pr-commits.png and b/docs/images/coverage-pr-commits.png differ diff --git a/docs/images/coverage-pr-commits.svg b/docs/images/coverage-pr-commits.svg index 9cdeebae..304c2d4a 100644 --- a/docs/images/coverage-pr-commits.svg +++ b/docs/images/coverage-pr-commits.svg @@ -1,4 +1,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/images/coverage-validate.png b/docs/images/coverage-validate.png index e077559f..31a784f8 100644 Binary files a/docs/images/coverage-validate.png and b/docs/images/coverage-validate.png differ diff --git a/docs/images/coverage-validate.svg b/docs/images/coverage-validate.svg index 115e5127..3155961a 100644 --- a/docs/images/coverage-validate.svg +++ b/docs/images/coverage-validate.svg @@ -1,4 +1,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index bb36bbfe..b644680a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -214,8 +214,11 @@ Because of this, to ensure that all code coverage metrics are available on Codac !!! note "Example" The example below shows that after pushing a commit that correctly sets up coverage on the main branch: - - Codacy will report coverage metrics for all subsequent commits and pull requests relative to the main branch - - Codacy won't report coverage metrics for commits and pull requests that are relative to older branches where the coverage setup wasn't performed yet + - Codacy will report coverage metrics for all subsequent commits and pull requests relative to the main branch. + + - Codacy won't report coverage metrics for commits and pull requests that are relative to older branches where the coverage setup wasn't performed yet. + + To solve this issue, you can rebase the old feature branch to update the common ancestor commit to one that already has coverage data. ![Setting up coverage on the main branch](images/coverage-validate.png) @@ -244,8 +247,8 @@ Follow these instructions to validate that your coverage setup is working correc
Commit not found
+Commit not found
Codacy doesn't have information about the commit associated with the coverage data.
Branch not enabled
+Branch not enabled
The commit associated with the coverage data doesn't belong to any branch that Codacy is analyzing.
Commit not analyzed
+Commit not analyzed
Due to technical limitations, Codacy only reports coverage for a commit after successfully completing the static code analysis of that commit.