Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save myungseokang/32e26ec50246a08a75b8c42c6ddd02d6 to your computer and use it in GitHub Desktop.

Select an option

Save myungseokang/32e26ec50246a08a75b8c42c6ddd02d6 to your computer and use it in GitHub Desktop.

Revisions

  1. @perhapsspy perhapsspy revised this gist Feb 28, 2017. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions git commit 전에 flake8 검사하기.md
    Original file line number Diff line number Diff line change
    @@ -3,9 +3,7 @@

    ```bash
    #!/bin/sh
    # Auto-check for pep8 so I don't check in bad code
    FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -e '\.py$')

    if [ -n "$FILES" ]; then
    flake8 $FILES
    fi
  2. @perhapsspy perhapsspy created this gist Feb 28, 2017.
    12 changes: 12 additions & 0 deletions git commit 전에 flake8 검사하기.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    자신의 git 프로젝트 폴더 안
    .git/hooks/pre-commit 파일에 아래 내용을 넣으세요.

    ```bash
    #!/bin/sh
    # Auto-check for pep8 so I don't check in bad code
    FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -e '\.py$')

    if [ -n "$FILES" ]; then
    flake8 $FILES
    fi
    ```