From 6b9f371c42959de7c7f8933964d8890c9f0b50a0 Mon Sep 17 00:00:00 2001 From: Uros <115799310+KatanicU@users.noreply.github.com> Date: Wed, 17 Dec 2025 14:04:21 +0100 Subject: [PATCH] Add new hook to forbid words in filenames --- .idea/.gitignore | 3 ++ .idea/aws.xml | 17 +++++++ .idea/inspectionProfiles/Project_Default.xml | 45 +++++++++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 +++ .idea/misc.xml | 7 +++ .idea/modules.xml | 8 ++++ .idea/pre-commit-hooks_fork.iml | 14 ++++++ .idea/vcs.xml | 6 +++ .pre-commit-config.yaml | 8 ++++ ...enames.py => forbid_words_in_filenames.py} | 0 10 files changed, 114 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/aws.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/pre-commit-hooks_fork.iml create mode 100644 .idea/vcs.xml rename pre_commit_hooks/{forbid_articles_in_test_filenames.py => forbid_words_in_filenames.py} (100%) diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/aws.xml b/.idea/aws.xml new file mode 100644 index 00000000..03f1bb6e --- /dev/null +++ b/.idea/aws.xml @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..e8802e44 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,45 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..105ce2da --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..8b9c50a7 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..d9ac3fda --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/pre-commit-hooks_fork.iml b/.idea/pre-commit-hooks_fork.iml new file mode 100644 index 00000000..8e5446ac --- /dev/null +++ b/.idea/pre-commit-hooks_fork.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fedfab33..147a5cc7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,3 +39,11 @@ repos: rev: v1.11.2 hooks: - id: mypy + +- repo: local + hooks: + - id: forbid-words-in-filenames + name: Check for forbidden words in filenames + entry: python3 pre_commit_hooks/forbid_words_in_filenames.py + language: system + types: [file] \ No newline at end of file diff --git a/pre_commit_hooks/forbid_articles_in_test_filenames.py b/pre_commit_hooks/forbid_words_in_filenames.py similarity index 100% rename from pre_commit_hooks/forbid_articles_in_test_filenames.py rename to pre_commit_hooks/forbid_words_in_filenames.py