From 6a1e435d0ab9a9d49318dbe4dd1345cc26e92fcb Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 21 Sep 2023 20:55:18 +0200 Subject: [PATCH] Add pre-commit flow --- .pre-commit-config.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a55ef9b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,33 @@ +--- +files: ^(.*\.(py|json|md|sh|yaml|cfg|txt))$ +exclude: ^(\.[^/]*cache/.*|.*/_user.py)$ +repos: + - repo: https://github.com/executablebooks/mdformat + # Do this before other tools "fixing" the line endings + rev: 0.7.17 + hooks: + - id: mdformat + name: Format Markdown + entry: mdformat # Executable to run, with fixed options + language: python + types: [markdown] + args: [--wrap, '75', --number] + additional_dependencies: + - mdformat-toc + - mdformat-beautysh + # -mdformat-shfmt + # -mdformat-tables + - mdformat-config + - mdformat-black + - mdformat-web + - mdformat-gfm + - repo: https://github.com/codespell-project/codespell + rev: v2.2.5 + hooks: + - id: codespell + args: + # - --builtin=clear,rare,informal,usage,code,names,en-GB_to_en-US + - --builtin=clear,rare,informal,usage,code,names + - --ignore-words-list=aci,master,jupyter,lite,ws,wan,hass,cmak,aks,tim,offen + - --skip="./.*" + - --quiet-level=2