File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [flake8]
2+ max-line-length = 88
3+ extend-ignore = W503,E203,F401
4+ exclude = */sdk/*
Original file line number Diff line number Diff line change @@ -5,5 +5,6 @@ source "${ROOT_DIR}/scripts/helpers"
55
66./scripts/check_isort
77./scripts/check_black
8+ ./scripts/check_flake8
89
910header " Proceeding with push"
Original file line number Diff line number Diff line change 2828 uses : actions/checkout@v2
2929 - name : Check code format
3030 run : ./scripts/check_black
31+
32+ flake8 :
33+ runs-on : ubuntu-latest
34+ container :
35+ image : sergioteula/pytools
36+ volumes :
37+ - ${{github.workspace}}:/code
38+ steps :
39+ - name : Check out code
40+ uses : actions/checkout@v2
41+ - name : Check code errors
42+ run : ./scripts/check_flake8
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ ROOT_DIR=" $( git rev-parse --show-toplevel) "
4+ source " ${ROOT_DIR} /scripts/helpers"
5+
6+ header " Checking code errors with flake8"
7+
8+ if [ -n " $( check_if_installed docker) " ]; then
9+ docker run -v " ${PWD} :/code" sergioteula/pytools flake8 --color always .
10+ elif [ -n " $( check_if_installed flake8) " ]; then
11+ flake8 --color always .
12+ else
13+ error " flake8 is not installed"
14+ exit 1
15+ fi
16+
17+ EXIT_CODE=" $? "
18+ if [ " $EXIT_CODE " = " 0" ]; then
19+ success " Code analysis with flake8 is correct"
20+ else
21+ error " There are errors detected by flake8"
22+ exit 1
23+ fi
You can’t perform that action at this time.
0 commit comments