michaellzc / vscode-hadolint

VSCode extension to integrate hadolint, a Dockerfile linter, into VSCode
https://marketplace.visualstudio.com/items?itemName=exiasr.hadolint
MIT License
77 stars 5 forks source link

Problems aren't cleared when file is closed #42

Closed mykter closed 1 year ago

mykter commented 3 years ago

If you open a Dockerfile that has issues but then close it again, the list of problems remains. Referencing https://github.com/microsoft/vscode/issues/59363

our recommendation for language providers so far is different and independent of a build task. What we recommend is the following:

  • single file language like linters should compute errors on file open and clear them on file close. Reason is that these languages usually don't have a project context.

It looks to me like the hadolint extension should clear the Problems list once a file is closed, as it is a single-file linter.

michaellzc commented 3 years ago

@mykter

Thanks for filing the issue.

I don't have a problem with adding what you requested to the plugin. Would you open to contribute?

-Michael