webcompat / webcompat.com

Source code for webcompat.com
https://webcompat.com
358 stars 191 forks source link

add python linting to automated local pre-commit linter #1661

Open zoepage opened 7 years ago

zoepage commented 7 years ago

It would be great to add the Python linter to our automated pre-commit linter, so it would catch errors before the Travis build runs.

karlcow commented 7 years ago

This is dependent on the solutions retained for #1473

karlcow commented 7 years ago

@zoepage to clarify the goal of your issue. Do you mean this below?

The linter will block the commit if the code is not respecting the rules we defined?

flake8 has an option for installing the hook. https://flake8.readthedocs.io/en/latest/user/using-hooks.html

zoepage commented 7 years ago

@karlcow yes :)

rheaparekh commented 7 years ago

I'd like to work on this. Should I go ahead with using flake8 for linting?

karlcow commented 7 years ago

@rheaparekh Let first define the tules in #1473 So not ready yet for working on this. But because you are pushing for it, I will take a look this week on how to make progress on #1473.