alexcouper / captainhook

Git hook scripts
BSD 3-Clause "New" or "Revised" License
54 stars 14 forks source link

Checkers aren't cleared out of hooks directory on install #18

Closed OddBloke closed 10 years ago

OddBloke commented 10 years ago

To hook in to the flake8 Python code, I obviously need to import from flake8 which we shadow. On renaming the check, the old files were left hanging around.

We should probably be able to clear out that entire directory every time we reinstall the hook...

alexcouper commented 10 years ago

Not really, as currently people can just add a new module into that package and it'll be run.

Sounds like what you're after is a version migration :)

OddBloke commented 10 years ago

In my mind, I've been assuming that people will get packages in to that directory by installing them in to their virtualenv and then using captainhook. For example:

pip install captainhook-camelcase
captainhook

This way, we can wipe out the contents of everything in there (and third-party modules can more easily release new versions).

OddBloke commented 10 years ago

Of course, we could just wipe out anything that has the captainhook identifier in...

alexcouper commented 10 years ago

Yeah, I think that'll be the best approach.

alexcouper commented 10 years ago

Resolved in https://github.com/alexcouper/captainhook/commit/2bc704000c720e787483c99d00392deade394a58