From 83f8561379dd923353da00bcf532a0e2853d0136 Mon Sep 17 00:00:00 2001
From: Simonas <20096648+simjak@users.noreply.github.com>
Date: Tue, 2 Jan 2024 11:28:52 +0200
Subject: [PATCH] feat: precommit hooks

---
 .pre-commit-config.yaml | 37 ++++++++++++++++++++++++++++++++-----
 1 file changed, 32 insertions(+), 5 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 98516d19..530abf4e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,11 @@
 default_language_version:
   python: python3.11.3
 repos:
+  - repo: meta
+    hooks:
+      - id: check-hooks-apply
+      - id: check-useless-excludes
+
   - repo: https://github.com/psf/black
     rev: 23.9.1
     hooks:
@@ -21,16 +26,38 @@ repos:
       - id: ruff-format
         types_or: [ python, pyi, jupyter ]
 
+  - repo: https://github.com/codespell-project/codespell
+    rev: v2.2.4
+    hooks:
+      - id: codespell
+        name: Run codespell to check for common misspellings in files
+        language: python
+        types: [ text ]
+        args: [ "--write-changes", "--ignore-words-list", "asend" ]
+        exclude: "poetry.lock"
+
 
   - repo: https://github.com/pre-commit/pre-commit-hooks
     rev: v4.4.0
     hooks:
-      - id: trailing-whitespace
+      - id: check-vcs-permalinks
       - id: end-of-file-fixer
+        # exclude: "tests/((commands|data)/|test_).+"
+      - id: trailing-whitespace
+        args: [ --markdown-linebreak-ext=md ]
+      - id: debug-statements
+      - id: no-commit-to-branch
+      - id: check-merge-conflict
+      - id: check-toml
       - id: check-yaml
+        args: [ '--unsafe' ] # for mkdocs.yml
+      - id: detect-private-key
 
-  - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
-    rev: v9.10.0
+  - repo: https://github.com/commitizen-tools/commitizen
+    rev: v3.13.0
     hooks:
-        - id: commitlint
-          stages: [commit-msg]
+      - id: commitizen
+      - id: commitizen-branch
+        stages:
+          - post-commit
+          - push
-- 
GitLab