Fixed travis script bug, where flake8 didn't pick up its configuration file

This commit is contained in:
VakarisZ 2020-11-06 13:18:03 +02:00
parent 1f1682fad8
commit 6401826ee3
4 changed files with 17 additions and 11 deletions

View File

@ -60,12 +60,12 @@ before_script:
script: script:
# Check Python code # Check Python code
- flake8 ./monkey --config ./ci_scripts/flake8_syntax_check.config - flake8 ./monkey --config=./ci_scripts/flake8_syntax_check.ini
## Warn about linter issues. ## Warn about linter issues.
### --exit-zero forces Flake8 to use the exit status code 0 even if there are errors, which means this will NOT fail the build. ### --exit-zero forces Flake8 to use the exit status code 0 even if there are errors, which means this will NOT fail the build.
### The output is redirected to a file. ### The output is redirected to a file.
- flake8 ./monkey --exit-zero --config ./ci_scripts/flake8_linter_check.config > ./ci_scripts/flake8_warnings.txt - flake8 ./monkey --exit-zero --config=./ci_scripts/flake8_linter_check.ini > ./ci_scripts/flake8_warnings.txt
## Display the linter issues ## Display the linter issues
- cat ./ci_scripts/flake8_warnings.txt - cat ./ci_scripts/flake8_warnings.txt
## Make sure that we haven't increased the amount of warnings. ## Make sure that we haven't increased the amount of warnings.

View File

@ -1,9 +0,0 @@
[flake8]
## Check syntax errors and fail the build if any are found.
exclude = ../monkey/monkey_island/cc/ui,
../monkey/common/cloud
select = E901,E999,F821,F822,F823
count = True
show-source = True
statistics = True

View File

@ -0,0 +1,15 @@
[flake8]
## Check syntax errors and fail the build if any are found.
exclude =
../monkey/monkey_island/cc/ui,
../monkey/common/cloud
select =
E901,
E999,
F821,
F822,
F823
count = True
show-source = True
statistics = True