Skip to content

Commit

Permalink
Fix removed but used imports
Browse files Browse the repository at this point in the history
+ put together scalafix and scalafmt tests.
  • Loading branch information
mlachkar committed Aug 11, 2020
1 parent 413f570 commit 753ca83
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,13 @@ jobs:
- run: sbt ci-213-windows
shell: bash
checks:
name: Scalafmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v7
- run: ./scalafmt --test
scalafix:
name: scalafix
name: Scalafmt and Scalafix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v7
- run: sbt "scalafix --check"
- run: ./scalafmt --test
mima:
name: MiMa
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ExplicitResultTypes {
OrganizeImports {
groupedImports = Explode
expandRelative = true
removeUnused = true
removeUnused = false # done already by RemoveUnused rule
groups = [
"re:javax?\\."
"scala."
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ inThisBuild(
onLoadMessage := s"Welcome to scalafix ${version.value}",
scalaVersion := scala213,
crossScalaVersions := List(scala213, scala212, scala211),
fork := true,
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
scalafixScalaBinaryVersion := scalaBinaryVersion.value,
scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.0",
fork := true
scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.0"
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ import scalafix.lint.RuleDiagnostic
import scalafix.patch.Patch.internal._
import scalafix.rule.RuleName
import scalafix.util.TreeExtractors.Mods
import scalafix.v0._ // used for cross-compilation.
import scalafix.v0._
// used to cross-compile
import scala.collection.compat._ // scalafix:ok

/** EscapeHatch is an algorithm to selectively disable rules. There
* are two mechanisms to do so: anchored comments and the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import scala.util.control.NonFatal
import scala.{meta => m}

import scala.meta.internal.semanticdb.scalac.SemanticdbOps
import scala.meta.io.AbsolutePath // Used for cross-compilation.
import scala.meta.io.AbsolutePath
// used to cross-compile
import scala.collection.compat._ // scalafix:ok

object ScalafixGlobal {
def newCompiler(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package scalafix.internal.rule

import scala.meta._

import scalafix.v1._ // Used for cross-compilation.
import scalafix.v1._
// used to cross-compile
import scala.collection.compat._ // scalafix:ok

class NoAutoTupling extends SemanticRule("NoAutoTupling") {

Expand Down

0 comments on commit 753ca83

Please sign in to comment.