From 87532b3f61fb98399607dcb6c2a2754be58a0495 Mon Sep 17 00:00:00 2001 From: ross-spencer Date: Mon, 28 Oct 2024 11:34:15 +0100 Subject: [PATCH] Makefile <> justfile Pre-commit hook versions are updated. --- .codespellignore | 1 + .pre-commit-config.yaml | 6 +++--- Makefile | 15 --------------- justfile | 17 +++++++++++++++++ 4 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 .codespellignore delete mode 100644 Makefile create mode 100644 justfile diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.codespellignore @@ -0,0 +1 @@ + diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62d6644..53d4c7c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,11 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-yaml - id: check-json - id: check-toml - id: end-of-file-fixer - exclude: ".svg" - id: trailing-whitespace - id: check-case-conflict - repo: https://github.com/igorshubovych/markdownlint-cli @@ -14,6 +13,7 @@ repos: hooks: - id: markdownlint - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.3.0 hooks: - id: codespell + args: [-I, .codespellignore] diff --git a/Makefile b/Makefile deleted file mode 100644 index 87cdde6..0000000 --- a/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -.DEFAULT_GOAL := help - -.PHONY: clean package package-deps package-source package-upload package-wheel tar-source - -all-checks: ## Run all pre-commit checks - pre-commit run --all-files - -spell: ## Run pre-commit spelling check - pre-commit run codespell --all-files - -markdown: ## Run pre-commit makdown-lint - pre-commit run markdownlint --all-files - -help: ## Print this help message - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/justfile b/justfile new file mode 100644 index 0000000..1dfd389 --- /dev/null +++ b/justfile @@ -0,0 +1,17 @@ +# CLI Helpers + +# Help +help: + just -l + +# Run all pre-commit checks +all-checks: + pre-commit run --all-files + +# Run pre-commit spelling check +spell: + pre-commit run codespell --all-files + +# Run pre-commit makdown-lint +markdown: + pre-commit run markdownlint --all-files