On Tue, Jul 28, 2015 at 11:12 AM, Noam Yorav-Raphael <noamr...@gmail.com> wrote: > Hi, > > We're using pylint as a pre-commit hook to check our code. However, it takes > about a minute for each run, and it's quite frustrating. > > I guess that most of the work is redundant, as most files do not change > between runs. How hard would it be to add the ability to cache results to > speed-up linting? I may be able to spend a day or two working on this, if > there's a relatively simple way to do this. > > Is it possible? > > Thanks, > Noam > > _______________________________________________ > code-quality mailing list > code-quality@python.org > https://mail.python.org/mailman/listinfo/code-quality >
Hi Noam, I guess that it won't be too hard if the unchanged files will not be analyzed, but if a file has a couple of lines changed that completely complicates the situation, since you'll have to do some sort of diff approach over the AST, which might not be trivial. For the latter case, you might find diff-cover (https://github.com/edx/diff-cover) useful. /Claudiu _______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality