mirror of
https://github.com/aljazceru/CTFd.git
synced 2026-01-31 20:04:28 +01:00
* add: use ruff instead of flake8 * Update ruff switches and remove flake8 plugins * fix: ignore linting rules * fix: ignore I001 * fix: spaces before noqa --------- Co-authored-by: Kevin Chung <kchung@ctfd.io>
33 lines
867 B
Makefile
33 lines
867 B
Makefile
lint:
|
|
ruff check --select E,F,W,B,C4,I --ignore E402,E501,E712,B904,B905 --exclude=CTFd/uploads CTFd/ migrations/ tests/
|
|
yarn lint
|
|
black --check --diff --exclude=CTFd/uploads --exclude=node_modules .
|
|
prettier --check 'CTFd/themes/**/assets/**/*'
|
|
prettier --check '**/*.md'
|
|
|
|
format:
|
|
isort --skip=CTFd/uploads -rc CTFd/ tests/
|
|
black --exclude=CTFd/uploads --exclude=node_modules .
|
|
prettier --write 'CTFd/themes/**/assets/**/*'
|
|
prettier --write '**/*.md'
|
|
|
|
test:
|
|
pytest -rf --cov=CTFd --cov-context=test --cov-report=xml \
|
|
--ignore-glob="**/node_modules/" \
|
|
--ignore=node_modules/ \
|
|
-W ignore::sqlalchemy.exc.SADeprecationWarning \
|
|
-W ignore::sqlalchemy.exc.SAWarning \
|
|
-n auto
|
|
bandit -r CTFd -x CTFd/uploads --skip B105,B322
|
|
pipdeptree
|
|
yarn verify
|
|
|
|
coverage:
|
|
coverage html --show-contexts
|
|
|
|
serve:
|
|
python serve.py
|
|
|
|
shell:
|
|
python manage.py shell
|