Refactoring: "package matching directory" is now an inspection

This commit is contained in:
Mikhail Glukhikh
2017-12-21 14:12:54 +03:00
parent 3f1a3dfeb2
commit 5affb9a25c
93 changed files with 343 additions and 294 deletions
@@ -0,0 +1,7 @@
package
class Foo
fun foo() {
}
@@ -0,0 +1,7 @@
<caret>package
class Foo
fun foo() {
}
@@ -0,0 +1,5 @@
{
"mainFile": "source/test.kt",
"inspectionClass": "org.jetbrains.kotlin.idea.refactoring.move.changePackage.PackageDirectoryMismatchInspection",
"fix": "Move file to source root"
}
@@ -0,0 +1,7 @@
package target
class Foo
fun foo() {
}
@@ -0,0 +1,7 @@
<caret>package target
class Foo
fun foo() {
}
@@ -0,0 +1,5 @@
{
"mainFile": "source/test.kt",
"inspectionClass": "org.jetbrains.kotlin.idea.refactoring.move.changePackage.PackageDirectoryMismatchInspection",
"fix": "Move file to 'target'"
}
@@ -0,0 +1,9 @@
package foo.bar
class Foo {
}
fun foo() {
}
@@ -0,0 +1,9 @@
pack<caret>age foo.bar
class Foo {
}
fun foo() {
}
@@ -0,0 +1,5 @@
{
"inspectionClass": "org.jetbrains.kotlin.idea.refactoring.move.changePackage.PackageDirectoryMismatchInspection",
"problem": "none",
"mainFile": "foo/bar/test.kt"
}