diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000000000000000000000000000000000000..85cfd4bbfd221221739573d1ce5409c10786ecc3 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +python 3.10.5 diff --git a/Makefile b/Makefile index f9b1e4d4e9e5e3bc3dcbec98df3c463ae672935d..d3e514e408257e0d44cadca5e8b97d22e920054e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,11 @@ -.PHONY: default lint test +.PHONY: default fmt lint test check fat default: ; +fmt: + cargo fmt + pipenv run fmt + lint: cargo fmt --check cargo check @@ -11,3 +15,12 @@ lint: test: cargo test pipenv run pytest + +check: + @$(MAKE) lint --no-print-directory + @$(MAKE) test --no-print-directory + +fat: + @$(MAKE) fmt --no-print-directory + @$(MAKE) lint --no-print-directory + @$(MAKE) test --no-print-directory diff --git a/Pipfile b/Pipfile index b9ebae4c90c38ae3a2367757d37437f2a92ae25a..e4c6e66f4b9561eac4e41f3862f9c4e6d7bdf3d4 100644 --- a/Pipfile +++ b/Pipfile @@ -17,6 +17,11 @@ pytest-clarity = "*" python_version = "3.10" [scripts] +fmt = """bash -c " +set -e -x +pipenv run black ./test +" +""" lint = """bash -c " set -e -x pipenv run flake8 ./test