deadem / notepad-pp-linter

Notepad++ Linter. Realtime code check against any checkstyle-compatible linter: jshint, eslint, jscs, phpcs, csslint etc
MIT License
37 stars 7 forks source link

Creates tmp files I can't get rid of #2

Closed emmahodcroft closed 6 years ago

emmahodcroft commented 6 years ago

I got the Linter Notepad++ plugin working with eslint, seemingly without issue (was showing red boxes and details in lower-left of Notepad++).

However I soon realised that whenever I opened a .js file it was creating a .tmp file. After opening these two a few times here's what it looks like: image

In Windows 10 I have no permissions to delete the files, or change the security/ownership so I can. It's a new computer, only ever had me as a user, and I'm admin.

In Ubuntu (running inside Windows 10) I also cannot delete the files. I seem to have full permissions but get 'No such file or directory' at every attempt to delete (including sudo and deleting by inode). I can open in vi and edit/delete the contents and save (see 0KB file above), but not the file itself. I've run all checks for 'invisible characters' but there seem to be none (and I can open in vi, as proof).

I've disabled this plugin to prevent it creating more tmp files. Running eslint on its own (in Ubuntu, Windows cmd, or via R commands) does not create the files.

Why are these created, and how can I get rid of them?

deadem commented 6 years ago

There are temporary files for linter analysis in realtime, just as you edit. And there are in pending state for delete by OS, so you can't edit or remove it manually. But the temp files should be removed automatically. Can you look at the file events with Process Monitor?

emmahodcroft commented 6 years ago

Thanks for the quick response. Here's one file being created from opening .js in Notepad++ with Linter extension enabled: image

emmahodcroft commented 6 years ago

As an update, a restart cleared the files. Not super practical though! If you advice on how to ensure they will be deleted more quickly I'd appreciate, as it's a neat plugin - but can't use it if it's going to write loads of files I can't get rid of!

deadem commented 6 years ago

Seems to be node.js locks file for some time after execution a linter program. I've made a small fixes that prevents of creation multiple temp files for one source. Can you try a new build of linter.dll?