AtomLinter / linter-codeclimate

An Atom Linter plugin for the Code Climate CLI
http://github.com/codeclimate/codeclimate
MIT License
10 stars 5 forks source link

Run only on changed code #69

Closed eyaleizenberg closed 6 years ago

eyaleizenberg commented 7 years ago

Hi, Is there a way to have the code climate linter run only on changed code (similar to the way it runs on the web app) rather than analyzing the whole file?

maxjacobson commented 7 years ago

Hi @eyaleizenberg. This isn't currently possible. It would need to be supported by the CLI before it would be supported by the Atom package. It's something we've thought about in the past, but haven't yet prioritized.

cgalvarez commented 7 years ago

Hi @eyaleizenberg. I think that approach would make some engines to provide false results. Think of the duplication engine, which could not find duplicated code inside a file if you just send the modified chunk of code, or calculating the complexity of a function with phpmd if you change some of its lines and only send them.

While some engines could not be affected, there are others that could, and as @maxjacobson said, this should be a feature implemented by each engine and ultimately by the CLI.