-
Notifications
You must be signed in to change notification settings - Fork 4
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
FixPlugin: Compare test files in course of building the TestResults by full paths #478
Conversation
…y full paths * Added test fore tests with the same name Closes #473
Codecov Report
@@ Coverage Diff @@
## main #478 +/- ##
============================================
+ Coverage 47.02% 47.25% +0.23%
- Complexity 152 154 +2
============================================
Files 53 53
Lines 1814 1822 +8
Branches 313 314 +1
============================================
+ Hits 853 861 +8
Misses 831 831
Partials 130 130
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
save-plugins/fix-plugin/src/commonMain/kotlin/com/saveourtool/save/plugins/fix/FixPlugin.kt
Outdated
Show resolved
Hide resolved
.substringAfter(Path.DIRECTORY_SEPARATOR) | ||
.toPath() | ||
|
||
val testCopy = test.createRelativePathToTheRoot(testConfig.getRootConfig().directory).toPath() |
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.
Should it be called testCopy
? I think it original test file
@@ -247,6 +247,17 @@ class FixPlugin( | |||
) | |||
} | |||
|
|||
private fun isComparingTestAndCopy(test: Path, testCopy: Path): Boolean { | |||
val testCopyPath = testCopy.relativeTo(FileSystem.SYSTEM_TEMPORARY_DIRECTORY) |
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.
Could you also write a comments, why do we calculate paths in this way?
Some words like: testCopyPath
stored in tmpDir
, holdind the whole hierarchy of original file
while test
file comes to us with path , starting from testRootPath
, so we compare them in such way
Closes #473