Skip to content
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

checkstyle.xml locked by IDEA process #417

Closed
Vampire opened this issue Dec 27, 2018 · 2 comments
Closed

checkstyle.xml locked by IDEA process #417

Vampire opened this issue Dec 27, 2018 · 2 comments

Comments

@Vampire
Copy link

Vampire commented Dec 27, 2018

I often have the problem on Windows that I cannot switch branches in Git as the IDEA process has a lock on the checkstyle.xml file.
I don't think there is any need to keep the file open, so please make sure the file handle is not leaked after you need it.

@jshiell
Copy link
Owner

jshiell commented Jan 3, 2019

Thanks for the report.

This is odd, as we shouldn't hold the hold on the file (we never need it more than momentarily), and we should give Checkstyle a stream to work with. The only thing I can think of off-hand is that Checkstyle isn't surrendering the steam, which we could potentially work around by reading it into memory before handing over the pointer. Certainly there's problems where Checkstyle holds onto the JAR files, which I know can cause these sort of issues on Windows. But the XML itself is a new one. I'll try have a butchers in the not too distant.

jshiell added a commit that referenced this issue Jan 12, 2019
…er possible. This is intentend to help limit file locking on Windows. It is also theoretical, as I do not use Windows. (#417)
@jshiell
Copy link
Owner

jshiell commented Jan 12, 2019

I've changed the file/HTTP/classpath endpoints to read the config to a buffer before caching it/passing it to Checkstyle - I hope this should break the link but it's all guesswork tbh as I don't use Windows, and OSX/Linux are not nearly so anal on file locking as Windows is. Do please feel free to reopen if the problem continues after the next release.

@jshiell jshiell closed this as completed Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants