Move: Implement inspection which reports mismatch between package directive and containing directory
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
package bar
|
||||
|
||||
class Foo {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package foo
|
||||
|
||||
class Foo {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>barPackageMismatched.kt</file>
|
||||
<line>1</line>
|
||||
<module>testPackageDirectoryMismatch_PackageDirectoryMismatch_0</module>
|
||||
<entry_point TYPE="file" FQNAME="barPackageMismatched.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Package name does not match containing directory</problem_class>
|
||||
<description>Move file to 'bar'</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>barPackageMismatched.kt</file>
|
||||
<line>1</line>
|
||||
<module>testPackageDirectoryMismatch_PackageDirectoryMismatch_0</module>
|
||||
<entry_point TYPE="file" FQNAME="barPackageMismatched.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Package name does not match containing directory</problem_class>
|
||||
<description>Change file's package to 'foo'</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"inspectionClass": "org.jetbrains.kotlin.idea.refactoring.move.changePackage.PackageDirectoryMismatchInspection"
|
||||
}
|
||||
Reference in New Issue
Block a user