-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Tests from examples/kotlin-diktat/warn-dir
are failing on Windows with diktat 1.1.0
#402
Comments
Do you mean Looks like something is broken in ktlint's pattern matching. save-cli runs the following command: java -jar ktlint --disabled_rules=standard -R diktat.jar C:\Users\<user>\AppData\Local\Temp\WarnPlugin--1261806134\warn-dir\**\*.kt which matches no files. I tried to experiment with forward slashes, but no luck. This, however java -jar ktlint --disabled_rules=standard --debug -R diktat.jar C:\Users\<user>\AppData\Local\Temp\WarnPlugin--1261806134\warn-dir\chapter1\*.kt works as expected. Also, running tests by relative glob also works: ...\save\examples\kotlin-diktat> java -jar ktlint --disabled_rules=standard --debug -R diktat.jar warn-dir\**\*.kt |
Only on windows |
I've opened saveourtool/diktat#1397 to investigate root cause and maybe even fix on ktlint's side. I'll disable these tests for now until this issue is resolved |
Actually now that I investigated it a bit, I find behavior of
I think we should append wildcard pattern to the root of test suite that is being currently executed. Edit: this is because of this code: save-cli/save-common/src/commonMain/kotlin/com/saveourtool/save/core/utils/CmdExecutorBase.kt Lines 74 to 78 in 1c24995
Edit 2: this logic even is fixed in this test: save-cli/save-core/src/commonNonJsTest/kotlin/com/saveourtool/save/core/integration/WarnDirTest.kt Lines 29 to 35 in 1c24995
but I can't neither remember nor understand why we implemented it this way :( @akuleshov7, do you remember if it's related to #350? |
As we discussed:
We need to create a logic on save-cloud for it also... |
* Disable tests that fails on Windows (`WarnDirTest`) * Overwrite existing test resources in gradle download tasks * Fix matcher in `runTestWithDiktat` (`ClassicWarnTest` is now actually passing) Tests are disabled until root cause of #402 is resolved
examples/kotlin-diktat/warn-dir
are failing on Windows with diktat 1.1.0
To sum up, tests in save-cli are failing because of some issues with ktlint 0.45.x + diktat 1.1.x, as described in #402 (comment). |
Need to check the relevance of the problem, a lot of time have passed, and the versions of used tool were upgraded |
We should try to re-enable tests disabled in #407 and see if they still fail. Otherwise, the problem is indeed resolved. |
Probably we will need to delete all tests and simply test real scenarios on the executable save-cli
The text was updated successfully, but these errors were encountered: