Closed paw-lu closed 3 years ago
Hi @paw-lu 👋
Thanks for trying Tryceratops :) I'll investigate it as soon as possible. Let me know if you find any other edge cases that may help debugging this issue.
I guess I found the issue, try to add require_serial: true
, so:
- repo: local
hooks:
- id: tryceratops
name: tryceratops
entry: tryceratops
language: system
require_serial: true
types: [python]
It worked for me :)
Full context Based on pre commit docs: https://pre-commit.com/#new-hooks
(optional: default false) if true this hook will execute using a single process instead of in parallel. new in 1.13.0.
So your pre-commit was launching several processes in parallel, and tryceratops was deleting the log file in the middle of process. By sticking to just one process, the deletion only happens at the end, so it's safe.
Yeah this fixed all issue reported.
Thanks for the fix, and thanks again for sharing your work here!
Thanks for sharing this work. Interesting idea for a linter!
When ran from a pre-commit hook as a local hook:
and
tryceratops-errors.log
has not been created yet, this is raised at each check:Things work fine if the command is invoked directly through the terminal.