tamayika / vscode-any-lint

VSCode Any Lint allows you to lint any files with any command line tools
Other
4 stars 2 forks source link

Run lint on file open #8

Closed sasq64 closed 10 months ago

sasq64 commented 10 months ago

Linter should run when a file is opened, at least in "change" mode.

tamayika commented 10 months ago

I published 0.2.1 which lint files on opening documents and clear diagnostics on closing documents.

sasq64 commented 10 months ago

Thanks, works fine!

sasq64 commented 10 months ago

... spoke too soon, it often doesn't clear/reload when you switch files.

Seems to always work the first time you open a file after starting VSCode, but when you switch back to it it doesn't update.

tamayika commented 10 months ago

I think it's too aggressive to lint when changing opened documents for single file linting. So, I will add new event for on setting.

sasq64 commented 10 months ago

Ok, but you should make sure you at least clear when switching. Also would be good to be able to tell if there are no errors in the file, or if the linter just hasn't run...

tamayika commented 10 months ago

I don't think it is necessary to clear when switching to other documents. Please tell me your usecase in detail.

sasq64 commented 10 months ago

You work one one file that has errors, you switch to another file and the errors from the old file are still listed which is confusing...

tamayika commented 10 months ago

I think it is normal to show multiple files errors in vscode. Why do you need to suppress other file errors even if it has actually lint errors?