summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2023-12-13 18:27:10 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2024-01-09 20:06:29 +0100
commitbc49940faaa8fa5df2e7528c95a7ecc1d54d665e (patch)
tree5e555434c6e2edd945797916b03d7d320d040649 /Makefile
parent77742675bb4349d55942ca30b20ab23a08d26d7c (diff)
format: add Ruff as a linter and formatter
Start using Ruff (https://docs.astral.sh/ruff/) as linter and formatter using a pre-commit hook to check and fix the format. The linter check are disabled until all errores are fixed. Fix #115 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1315>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a0ea96c0..60ea8fbe 100644
--- a/Makefile
+++ b/Makefile
@@ -13,12 +13,15 @@ install:
dist-tarball:
python setup.py sdist --formats=bztar
-check-pep8:
- find cerbero ! -regex cerbero/packages/debian.py -name \*.py | sort -u | xargs pep8 --ignore=E128 --repeat
+format:
+ ruff format .
+
+check-format:
+ ruff check .
check:
PYTHONPATH=$(PYTHONPATH):./test:./cerbero; trial test
- make check-pep8
+ make check-format
coverage:
rm -rf _trial_temp