2022-09-23 10:20:11 +00:00
|
|
|
|
2022-10-08 14:47:20 +00:00
|
|
|
SHELL=/bin/bash
|
|
|
|
|
2022-09-23 10:20:11 +00:00
|
|
|
all: lint_node lint_python
|
|
|
|
|
2022-09-25 15:29:20 +00:00
|
|
|
TARGET_DIRS:=./whispering
|
2022-09-23 10:20:11 +00:00
|
|
|
|
|
|
|
flake8:
|
|
|
|
find $(TARGET_DIRS) | grep '\.py$$' | xargs flake8
|
|
|
|
black:
|
2022-10-09 15:36:51 +00:00
|
|
|
find $(TARGET_DIRS) | grep '\.py$$' | xargs black --diff | python ./scripts/check_null.py
|
2022-09-23 10:20:11 +00:00
|
|
|
isort:
|
2022-10-09 15:36:51 +00:00
|
|
|
find $(TARGET_DIRS) | grep '\.py$$' | xargs isort --diff | python ./scripts/check_null.py
|
2022-09-23 10:20:11 +00:00
|
|
|
pydocstyle:
|
|
|
|
find $(TARGET_DIRS) | grep -v tests | xargs pydocstyle --ignore=D100,D101,D102,D103,D104,D105,D107,D203,D212
|
2022-10-09 14:56:39 +00:00
|
|
|
pytest:
|
|
|
|
pytest
|
2022-09-23 10:20:11 +00:00
|
|
|
|
|
|
|
yamllint:
|
|
|
|
find . \( -name node_modules -o -name .venv \) -prune -o -type f -name '*.yml' -print \
|
|
|
|
| xargs yamllint --no-warnings
|
|
|
|
|
2022-10-08 14:47:20 +00:00
|
|
|
version_check:
|
2022-10-09 15:42:06 +00:00
|
|
|
git tag | python ./scripts/check_version.py --toml pyproject.toml -i README.md --tags -
|
2022-10-08 14:47:20 +00:00
|
|
|
|
2022-10-09 14:56:39 +00:00
|
|
|
lint_python: flake8 black isort pydocstyle version_check pytest
|
2022-09-23 10:20:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
pyright:
|
|
|
|
npx pyright
|
|
|
|
|
|
|
|
markdownlint:
|
|
|
|
find . -type d \( -name node_modules -o -name .venv \) -prune -o -type f -name '*.md' -print \
|
|
|
|
| xargs npx markdownlint --config ./.markdownlint.json
|
|
|
|
|
|
|
|
lint_node: markdownlint pyright
|
|
|
|
|