Skip to content

Commit 9bc6f26

Browse files
committed
Introduce flake8 tool into CI
1 parent 7909a44 commit 9bc6f26

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

run-code-analysis.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ NONE_OUT="\033[0m"
99

1010
# specifies a set of variables to declare files to be used for code assessment
1111
PROJECT_FILES="./"
12-
TESTS_FILES="tests"
1312

1413

1514
function store-failures {
@@ -45,16 +44,22 @@ function run-unittests {
4544
}
4645

4746

48-
function run-black-analysis() {
47+
function run-black-analysis {
4948
echo "Running black analysis ..." && ( black --check "${PROJECT_FILES}" )
5049
}
5150

5251

52+
function run-flake8-analysis {
53+
echo "Running flake8 analysis ..." && ( flake8 "${PROJECT_FILES}" )
54+
}
55+
56+
5357
function run-code-analysis {
5458
echo "Running code analysis ..."
5559
remove-pycache-trash
5660
run-unittests || store-failures "Unittests are failed!"
5761
run-black-analysis || store-failures "black analysis is failed!"
62+
run-flake8-analysis || store-failures "flake8 analysis is failed!"
5863

5964
if [[ ${#RESULT[@]} -ne 0 ]];
6065
then echo -e "${FAILED_OUT}Some errors occurred while analysing the code quality.${NONE_OUT}"

0 commit comments

Comments
 (0)