linter-javac icon indicating copy to clipboard operation
linter-javac copied to clipboard

Live Linting

Open markmansur opened this issue 9 years ago • 2 comments

Can we have an option to provide live listing? instead of on save?

markmansur avatar Oct 07 '16 01:10 markmansur

Live linting requires several things to be true to be able to be supported. The problem with compiler based "linters" like this is they often don't support input from stdin with the ability to specify a file that the input represents, which would be necessary to properly support it.

There are a few linters that can still be ran on the fly if they don't support stdin simply because the stuff they are linting is so simple it doesn't depend on other files so a temporary file can be generated representing the current contents... but that method isn't going to work here.

As I'm personally unfamiliar with whether or not javac can be ran like the method described above I'll leave this to @AtomLinter/linter-javac to make the final call on this, it's highly likely this isn't possible though.

Arcanemagus avatar Oct 07 '16 17:10 Arcanemagus

Thanks for the question @mmansur2 and for your description @Arcanemagus.

The "on save" restriction is in fact something i would like to change in the future.

I see a possible solution for that problem, by creating a looping lint, which loops until the last change of the codebase was linted. This might, of course, cause some higher load if this option is used on big projects but i guess it will be better than nothing.

florianb avatar Oct 10 '16 11:10 florianb