mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-11 22:50:09 +00:00
101 lines
2.1 KiB
INI
101 lines
2.1 KiB
INI
[tox]
|
|
envlist = py310, py311
|
|
skipsdist = True
|
|
isolated_build = true
|
|
|
|
[testenv:test]
|
|
skip_install = true
|
|
deps =
|
|
allowlist_externals =
|
|
git
|
|
poetry
|
|
commands =
|
|
git submodule update --init --recursive
|
|
poetry install --no-root --only main --no-interaction --no-ansi
|
|
poetry run python manage.py test mobsf
|
|
|
|
[testenv:lint]
|
|
skip_install = true
|
|
deps =
|
|
pydocstyle
|
|
flake8
|
|
flake8-broken-line
|
|
flake8-bugbear
|
|
flake8-builtins
|
|
flake8-colors
|
|
flake8-commas
|
|
flake8-comprehensions
|
|
flake8-docstrings
|
|
flake8-eradicate
|
|
flake8-import-order
|
|
flake8-logging-format
|
|
flake8-quotes
|
|
flake8-self
|
|
pep8-naming
|
|
radon
|
|
codespell
|
|
commands =
|
|
flake8 {posargs}
|
|
codespell --ignore-words-list="doubleclick,dout,ne,upto,lief,afile" \
|
|
--skip="./mobsf/StaticAnalyzer/tools/*,./mobsf/signatures/*,./mobsf/StaticAnalyzer/views/android/rules/*,.*.map,*.js,*.svg,./build/*,./.tox/*,./venv/*,./.git/*,./poetry.lock"
|
|
|
|
[testenv:clean]
|
|
deps =
|
|
skip_install = true
|
|
allowlist_externals =
|
|
bash
|
|
find
|
|
rm
|
|
commands =
|
|
find . -name "*.py[co]" -delete
|
|
bash -c 'find . -name "__pycache__" -exec rm -fr \{\} \; -prune'
|
|
bash -c 'find . -depth -name "*.egg-info" -exec rm -fr \{\} \;'
|
|
rm -rf build dist
|
|
bash -c './scripts/clean.sh y'
|
|
|
|
|
|
|
|
# Reference for error codes:
|
|
# http://www.pydocstyle.org/en/latest/error_codes.html
|
|
[flake8]
|
|
enable-extensions = G
|
|
exclude =
|
|
.tox
|
|
.git
|
|
__pycache__
|
|
mobsf/uploads
|
|
mobsf/downloads
|
|
mobsf/static
|
|
mobsf/templates
|
|
venv
|
|
build
|
|
mobsf/DynamicAnalyzer/tools/adb/
|
|
mobsf/StaticAnalyzer/migrations/
|
|
ignore =
|
|
D100,
|
|
D101,
|
|
D102,
|
|
D103,
|
|
D104,
|
|
D105,
|
|
D107,
|
|
D401,
|
|
W503,
|
|
Q003,
|
|
# Allow only ' for strings
|
|
SF01,
|
|
# Allow private member access
|
|
I100,
|
|
# Use python sort imports
|
|
R701,
|
|
# TODO fix this later too complex
|
|
C901,
|
|
# TODO function too complex
|
|
N400,
|
|
# For ASCII art
|
|
W605,
|
|
# For ASCII art invalid escape sequence
|
|
# remove # flake8: noqa from manifest_analysis.py, should be fixed with R701
|
|
max-complexity = 42
|
|
radon_max_cc = 10
|