File: pre-commit.hook

package info (click to toggle)
gnome-authenticator 3.32.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,768 kB
  • sloc: python: 1,936; xml: 19; sh: 13; makefile: 3
file content (16 lines) | stat: -rwxr-xr-x 352 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

if ! which flake8 &> /dev/null; then
    echo "Please install flake8 first"
    exit -1
fi

echo "--Checking style--"
flake8 --ignore E402,W503,E501 --show-source src/ --exclude __init__.py
if test $? != 0; then
    echo "--Checking style fail--"
    echo "Please fix the above issues"
    exit -1
else
    echo "--Checking style pass--"
fi