Skip to content
Snippets Groups Projects
Commit e5d0f2e6 authored by Jan Maximilian Michal's avatar Jan Maximilian Michal
Browse files

Works for me. Should resolve the issues mentioned in #47.

parent e684f25e
No related branches found
No related tags found
2 merge requests!15Refactor,!14Pre commit
Pipeline #
......@@ -3,6 +3,6 @@ repos:
hooks:
- id: prospector
name: prospector
entry: python -m prospector -u django
language: system
types: [python]
entry: ./prospector.sh
language: python
files: \.py$
  • robinwilliam.hundt @robinwilliam.hundt ·
    Maintainer

    After long last, i've found a solution that works and doesn't even depend on pre-commit (screw that). Just add a pre-commit file to .git/hooks with the following content:

    #!/bin/bash
    
    cd backend
    unset GIT_DIR
    git diff  --cached --name-only --relative | xargs prospector --uses django

    Prospector must be installed, so either the virtualenv must be activated during commit, or it mus be installed system-wide.

    Edited by robinwilliam.hundt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment