-
Notifications
You must be signed in to change notification settings - Fork 166
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
Deleted file causes file not found exception #539
Comments
@NikolayMetchev did you found a fix for this? I'm experiencing the same issue when using |
The workaround is to delete the build directory |
@NikolayMetchev can you share the steps to reproduce this issue? |
I am sorry, It only happened to me once. I debugged the code and that is all the info I have. Somehow you have to get a file into the snapshot field and then delete that file. |
@AleksanderBrzozowski I just got hit with this same bug. |
I was able to reproduce this issue locally, so I thought I would give it a try. |
I ran into this by having a repo and then renaming the parent dir/repo after running ktlint tasks and checking things in. |
I was able to debug the plugin and found that BaseKtLintCheckTask.kt has a bug in the runFormat() method.
When it is calculating the filesToCheck it uses snapshot.formattedSources.keys which can contain a deleted file and you get the exception below. I guess you need to filter the list for files that don't exist.
The text was updated successfully, but these errors were encountered: