diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70554c9..831dbcd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,22 +2,48 @@ default_install_hook_types: [pre-commit, commit-msg] repos: - repo: https://github.com/lyz-code/yamlfix - rev: 1.16.0 + rev: 1.17.0 hooks: - id: yamlfix args: [-c, .yamlfix.toml] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: + - id: check-added-large-files + - id: check-case-conflict - id: check-merge-conflict - id: trailing-whitespace - - id: check-xml - id: check-json - id: check-yaml + - id: check-xml - id: no-commit-to-branch - id: mixed-line-ending + - id: end-of-file-fixer + - repo: local + hooks: + - id: sensitive-data-leak-urls + name: Sensitive data leak - URLs + entry: sbb\.ch\b + language: pygrep + types: [text] + exclude: \b(www\.|polarion-opensource@)sbb\.ch\b + - id: sensitive-data-leak-ue-numbers + name: Sensitive data leak - UE numbers + entry: ([uUeE]{1,2})\d{5,6} + language: pygrep + types: [text] + - repo: local + hooks: + - id: mypy + name: mypy + entry: poetry run mypy + language: system + types: [python] + exclude: (^tests/) + args: [--config-file, pyproject.toml] + require_serial: true # Serial processing is required for mypy (better performance and error reporting) - repo: https://github.com/zricethezav/gitleaks - rev: v8.18.4 + rev: v8.21.0 hooks: - id: gitleaks - repo: https://github.com/grigoriev/pre-commit-check-git-user @@ -26,6 +52,6 @@ repos: - id: check-git-config-user-email args: [--templates, ^\S+\.\S+@sbb\.ch$] - repo: https://github.com/commitizen-tools/commitizen - rev: v3.29.0 + rev: v3.29.1 hooks: - id: commitizen