Makefile: Add command for formatting and linting
Format code: make format Lint code (automatically fixing issues when possible): make lint Related #2295
This commit is contained in:
parent
fb6285606d
commit
35f63edcd8
10
Makefile
10
Makefile
|
@ -8,7 +8,7 @@ PIP_ARGS ?= .
|
|||
.PHONY: install_ubuntu install_macos
|
||||
.PHONY: install_apt install_brew install_pip
|
||||
.PHONY: install_udev install_udev_uinput reload_udev uninstall_udev
|
||||
.PHONY: test
|
||||
.PHONY: format lint test
|
||||
|
||||
install_ubuntu: install_apt install_udev_uinput install_pip
|
||||
|
||||
|
@ -48,6 +48,14 @@ uninstall_udev:
|
|||
sudo rm -f $(UDEV_RULES_DEST)/$(UDEV_RULE_FILE)
|
||||
make reload_udev
|
||||
|
||||
format:
|
||||
@echo "Formatting Solaar code"
|
||||
ruff format .
|
||||
|
||||
lint:
|
||||
@echo "Linting Solaar code"
|
||||
ruff check . --fix
|
||||
|
||||
test:
|
||||
@echo "Running Solaar tests"
|
||||
pytest --cov=lib/ tests/
|
||||
|
|
Loading…
Reference in New Issue