Code review comment for ~jslarraz/review-tools:add-pre-commit-hook

Revision history for this message
Jorge Sancho Larraz (jslarraz) wrote :

From my point of view, ideally we would like the git-hook to run black and linters only on modified files (as a `quick` check), and lpci to run them on the whole project anyway.

Independently on how those tools are run (i.e. git-hooks or lpci), they should be called with the same arguments. I tried to use the same arguments in the git-hook as used in current scripts (with the exception of black, as we agreed to start enforcing the format instead of just complain) but I agree that them should be handled in just one place for maintainability. Thus, scripts should be updated to be able to operate on a list of files.

I'm now wondering whether we should define those black/flake8/pylint runners directly in the Makefile defining the relevant targets and get rid of `run-black`, `run-flake8`, ` run-pylint` and `run-helper` to clean up the repository top level directory. Does it make sense?

« Back to merge proposal