yujinakayama / atom-lint

Obsolete: Generic code linting support for Atom
https://atom.io/packages/atom-lint
MIT License
111 stars 33 forks source link

Add on-modified handling for flake8 #24

Closed tresni closed 9 years ago

tresni commented 10 years ago

Along the lines of #4. Here's how I added support for on-modification linting for most linters.

I would probably add a test in bufferLint that exits if we detect we are already linting so we multiple linting processes running at the same time.

tresni commented 10 years ago

For Linters like rubocop and HLint you could potentially write to a temporary file to allow on change linting.

yujinakayama commented 10 years ago

Thanks for the pull request. However the implementation lacks configuration handling for each linters. (And that's why I have not yet introduced the realtime linting.)

For instance, flake8 normally refers project specific configuration setup.cfg by ascending ancestor directories of the target file. But when flake8 inspects a source from STDIN, it does not refers the configuration. So with the current implementation, atom-lint displays different results whether it's run on save or on modification.

CoffeeLint does same thing with coffeelint.json and most other linters also do that.

tresni commented 10 years ago

You may be able to deal with this by setting the working directory. Not sure if commandrunner can do that yet but I'll play around with it.

On Sunday, March 16, 2014, Yuji Nakayama notifications@github.com wrote:

Thanks for the pull request. However the implementation lacks configuration handling for each linters. (And that's why I have not yet introduced the realtime linting.)

For instance, flake8 normally refers project specific configuration setup.cfg by ascending ancestor directories of the target file. But when flake8 inspects a source from STDIN, it does not refers the configuration. So with the current implementation, atom-lint shows different results if it's run on save or modification.

CoffeeLint does same thing with coffeelint.json and most other linters also do that.

Reply to this email directly or view it on GitHubhttps://github.com/yujinakayama/atom-lint/pull/24#issuecomment-37751352 .

-- Brian Sent from Gmail Mobile