-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support Rename in SyntacticOrganizeImports
- Loading branch information
Showing
10 changed files
with
162 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
rule = SyntacticOrganizeImports | ||
*/ | ||
package fix | ||
|
||
import scala.collection.mutable.ArrayBuffer as A // assert: SyntacticOrganizeImports | ||
import scala.collection.mutable.SortedMap | ||
|
||
class SyntacticOrganizeImportsTest3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
rule = SyntacticOrganizeImports | ||
*/ | ||
package fix | ||
|
||
import scala.collection.mutable.{ArrayBuffer => A} // assert: SyntacticOrganizeImports | ||
import scala.collection.mutable.SortedMap | ||
|
||
class SyntacticOrganizeImportsTest4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
rules = [ | ||
SyntacticOrganizeImports | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package foo | ||
|
||
import scala.util.Random | ||
|
||
import scala.util.Success | ||
|
||
|
||
import scala.util.Try | ||
|
||
trait A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ThisBuild / scalafixDependencies += "com.github.xuwei-k" %% "scalafix-rules" % sys.props("scalafix-rules.version") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[{ | ||
"message": "[SyntacticOrganizeImports] there is empty line in top level imports", | ||
"position": { | ||
"line": 3, | ||
"lineContent": "", | ||
"sourcePath": "${BASE}/A.scala", | ||
"startLine": 3, | ||
"startColumn": 0, | ||
"endLine": 4, | ||
"endColumn": 0 | ||
} | ||
}, { | ||
"message": "[SyntacticOrganizeImports] there is empty line in top level imports", | ||
"position": { | ||
"line": 5, | ||
"lineContent": "", | ||
"sourcePath": "${BASE}/A.scala", | ||
"startLine": 5, | ||
"startColumn": 0, | ||
"endLine": 6, | ||
"endColumn": 0 | ||
} | ||
}, { | ||
"message": "[SyntacticOrganizeImports] there is empty line in top level imports", | ||
"position": { | ||
"line": 6, | ||
"lineContent": "", | ||
"sourcePath": "${BASE}/A.scala", | ||
"startLine": 6, | ||
"startColumn": 0, | ||
"endLine": 7, | ||
"endColumn": 0 | ||
} | ||
}, { | ||
"message": "[SyntacticOrganizeImports] there is empty line in top level imports", | ||
"position": { | ||
"line": 3, | ||
"lineContent": "", | ||
"sourcePath": "${BASE}/A.scala", | ||
"startLine": 3, | ||
"startColumn": 0, | ||
"endLine": 4, | ||
"endColumn": 0 | ||
} | ||
}, { | ||
"message": "[SyntacticOrganizeImports] there is empty line in top level imports", | ||
"position": { | ||
"line": 5, | ||
"lineContent": "", | ||
"sourcePath": "${BASE}/A.scala", | ||
"startLine": 5, | ||
"startColumn": 0, | ||
"endLine": 6, | ||
"endColumn": 0 | ||
} | ||
}, { | ||
"message": "[SyntacticOrganizeImports] there is empty line in top level imports", | ||
"position": { | ||
"line": 6, | ||
"lineContent": "", | ||
"sourcePath": "${BASE}/A.scala", | ||
"startLine": 6, | ||
"startColumn": 0, | ||
"endLine": 7, | ||
"endColumn": 0 | ||
} | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % sys.props("scalafix.version")) | ||
addSbtPlugin("com.github.xuwei-k" % "warning-diff-scalafix-plugin" % "0.2.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
> warningsAll | ||
$ must-mirror target/warnings/warnings.json expect.json |