Page MenuHomeSoftware Heritage

Makefile.python: make "make check" use pre-commit
ClosedPublic

Authored by zack on Apr 8 2020, 8:28 PM.

Details

Summary

this reduces logic duplication, YAY!

Test Plan

make check in a repo of swh-environment of your choice

Diff Detail

Repository
rDENV Development environment
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont requested changes to this revision.Apr 9 2020, 9:31 AM
ardumont added a subscriber: ardumont.

Please, also clean up the tool environment variables :)

This revision now requires changes to proceed.Apr 9 2020, 9:31 AM
  • Makefile.python: drop unused vars as well as check-staged
This revision is now accepted and ready to land.Apr 9 2020, 9:45 AM

Please, also clean up the tool environment variables :)

Ah, good point, thanks. Done.

Note that I've now also removed check-staged, because I consider it subsumed by pre-commit too, as it will be run before the commit actually happens anyway.

One more step, I had to:

cd swh-environment
rm swh-*/.git/hooks/pre-commit.legacy