#3515 closed defect (fixed)

The pre-commit push hook takes a long time to run

Reported by: exarkun Owned by: GitHub <noreply@…>
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: review Cc:
Launchpad Bug:


On my system, 10-20 seconds. This is a noticeable disruption in workflow as by the time I am pushing I am ready to move to something new but I have to wait for this to finish before I feel safe touching my checkout.

Change History (4)

comment:1 Changed at 2020-11-19T16:00:24Z by exarkun

Currently the hook runs tox -e codechecks which runs flake8 on all source files in the checkout.

It seems like it would be good to run flake8 only on files being modified by changesets being pushed. flake8 does no cross-source-file checking so there is no way for a change in file X to introduce a flake in file Y. So checking only changed files seems safe.

comment:3 Changed at 2020-11-19T16:14:18Z by exarkun

  • Keywords review added

comment:4 Changed at 2020-12-04T14:40:26Z by GitHub <noreply@…>

  • Owner set to GitHub <noreply@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 840a8af/trunk:

Merge pull request #904 from tahoe-lafs/3515.partial-pre-commit

Configure pre-commit push hook to run on changed files only

Fixes: ticket:3515

Note: See TracTickets for help on using tickets.