-
-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MatchingDeclarationName. KtFilesSpec also remove .common.kt suffix from kotlin files #5851
MatchingDeclarationName. KtFilesSpec also remove .common.kt suffix from kotlin files #5851
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5851 +/- ##
============================================
+ Coverage 84.48% 84.58% +0.09%
- Complexity 3743 3785 +42
============================================
Files 546 546
Lines 12788 12941 +153
Branches 2230 2276 +46
============================================
+ Hits 10804 10946 +142
+ Misses 869 862 -7
- Partials 1115 1133 +18
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks! I just left some minor things.
|
||
val PsiFile.fileName: String | ||
get() = name.substringAfterLast(File.separatorChar) | ||
|
||
/** | ||
* Removes kotlin specific file name suffixes, e.g. .kt. | ||
* Note, will note remove other possible/knowb file suffixes like .java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Note, will note remove other possible/knowb file suffixes like .java | |
* Note, will not remove other possible/knowb file suffixes like .java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, also knowb -> known
@@ -10,16 +10,29 @@ import java.nio.file.Paths | |||
|
|||
const val KOTLIN_SUFFIX = ".kt" | |||
const val KOTLIN_SCRIPT_SUFFIX = ".kts" | |||
const val KOTLIN_KMP_COMMON_SUFFIX = ".common.kt" | |||
|
|||
val KOTLIN_FILE_SUFFIXES = arrayOf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val KOTLIN_FILE_SUFFIXES = arrayOf( | |
private val KOTLIN_FILE_SUFFIXES = arrayOf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -10,16 +10,29 @@ import java.nio.file.Paths | |||
|
|||
const val KOTLIN_SUFFIX = ".kt" | |||
const val KOTLIN_SCRIPT_SUFFIX = ".kts" | |||
const val KOTLIN_KMP_COMMON_SUFFIX = ".common.kt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const val KOTLIN_KMP_COMMON_SUFFIX = ".common.kt" | |
private const val KOTLIN_KMP_COMMON_SUFFIX = ".common.kt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
No changes for rule itself, but MatchingDeclarationName now will threat
.common.kt
suffix as known kotlin file part.