From a5a934dac14e548af14e53e57b31c79f0a893552 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Mon, 13 Oct 2025 18:29:42 +1000 Subject: [PATCH] pre-commit: add hooks `check-illegal-windows-names` and `file-contents-sorter` (#11662) --- .github/linters/codespell.txt | 2 +- .pre-commit-config.yaml | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/linters/codespell.txt b/.github/linters/codespell.txt index 55918266312..27761c70f44 100644 --- a/.github/linters/codespell.txt +++ b/.github/linters/codespell.txt @@ -375,6 +375,7 @@ propogate provison psudo pyhsical +re-use readabilty readd reccuring @@ -411,7 +412,6 @@ retriving retrun retuned returing -re-use rever rocessor runing diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70d7e39cdf3..c8270892b5b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,11 +32,12 @@ repos: name: run gitleaks description: detect hardcoded secrets - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: #- id: check-added-large-files - id: check-case-conflict #- id: check-executables-have-shebangs + - id: check-illegal-windows-names - id: check-merge-conflict - id: check-shebang-scripts-are-executable files: \.sh$ @@ -50,7 +51,7 @@ repos: exclude: > (?x) ^scripts/vm/systemvm/id_rsa\.cloud$| - ^server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java$| + ^server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest\.java$| ^server/src/test/java/com/cloud/keystore/KeystoreTest\.java$| ^server/src/test/resources/certs/dsa_self_signed\.key$| ^server/src/test/resources/certs/non_root\.key$| @@ -61,9 +62,12 @@ repos: ^services/console-proxy/rdpconsole/src/test/doc/rdp-key\.pem$| ^systemvm/agent/certs/localhost\.key$| ^systemvm/agent/certs/realhostip\.key$| - ^test/integration/smoke/test_ssl_offloading.py$ + ^test/integration/smoke/test_ssl_offloading\.py$ - id: end-of-file-fixer exclude: \.vhd$ + - id: file-contents-sorter + args: [--unique] + files: ^\.github/linters/codespell\.txt$ - id: fix-byte-order-marker - id: forbid-submodules - id: mixed-line-ending