Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

tests: Add pytest-flake8 to tests

Brendan Colesd1dc84a3dfd2
diff --git a/.travis.yml b/.travis.yml
index 7ef84478..0c9c51c3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,13 +10,14 @@ before_install:
- python --version
- pip install -U pip
- pip install -U pytest
+ - pip install -U pytest-flake8
- pip install codecov
install:
- pip install -r requirements_test.txt
script:
- - python -m pytest --durations=5 --cov-report term --cov=. test/
+ - python -m pytest --flake8 --durations=5 --cov-report term --cov=. .
after_success:
- bash <(curl -s https://codecov.io/bash)
diff --git a/requirements_test.txt b/requirements_test.txt
index a74ecd86..923308c9 100644
--- a/requirements_test.txt
+++ b/requirements_test.txt
@@ -3,4 +3,5 @@ pytest==5.3.0
pytest-mock==1.12.0
responses==0.10.6
pytest-cov==2.8.1
+pytest-flake8==1.0.6
pycodestyle==2.6.0
diff --git a/setup.cfg b/setup.cfg
index 2765295e..dad1e9c4 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,3 @@
-[tool:pytest]
-flake8-max-line-length = 200
+[flake8]
+flake8-max-line-length = 120
+ignore = F841 E501 E131 E401 F401 E202 E201 E302 E265 W605 W293 W291 W504 E203 E121 E226 E722 W191 E127 E741 E126 E127 E128 E711 E303 E261 E241 E225 E502 E101 E123 E301 E117 E125 E115 E262 E227 E231 E221 E712 E111 F821 W503 W391 E731 E222 E271