From b18e34c905ff64d50441d43c9f5529742b5762af Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 7 Mar 2026 17:04:48 +1100 Subject: [PATCH] feat: additional pre-commit checks - add all precommit checks from pre-commit's hooks repo - ensure scripts with shebangs are executable --- .pre-commit-config.yaml | 19 ++++++++++++++++--- rpms/incus/resources/shutdown | 0 .../resources/scripts/postinstall.sh | 0 .../resources/scripts/preinstall.sh | 0 .../resources/scripts/preinstall.sh | 0 rpms/puppet-initial/resources/puppet-initial | 0 .../resources/scripts/postinstall.sh | 0 .../resources/scripts/postremove.sh | 0 .../resources/scripts/preinstall.sh | 0 .../resources/scripts/preremove.sh | 0 .../stalwart/resources/scripts/postinstall.sh | 0 rpms/stalwart/resources/scripts/postremove.sh | 0 rpms/stalwart/resources/scripts/preinstall.sh | 0 rpms/stalwart/resources/scripts/preremove.sh | 0 rpms/unkin-undionly-kpxe/resources/main.ipxe | 0 15 files changed, 16 insertions(+), 3 deletions(-) mode change 100644 => 100755 rpms/incus/resources/shutdown mode change 100644 => 100755 rpms/libfoundationdb/resources/scripts/postinstall.sh mode change 100644 => 100755 rpms/openbao-plugin-secret-consul/resources/scripts/preinstall.sh mode change 100644 => 100755 rpms/openbao-plugin-secret-nomad/resources/scripts/preinstall.sh mode change 100644 => 100755 rpms/puppet-initial/resources/puppet-initial mode change 100644 => 100755 rpms/stalwart-foundationdb/resources/scripts/postinstall.sh mode change 100644 => 100755 rpms/stalwart-foundationdb/resources/scripts/postremove.sh mode change 100644 => 100755 rpms/stalwart-foundationdb/resources/scripts/preinstall.sh mode change 100644 => 100755 rpms/stalwart-foundationdb/resources/scripts/preremove.sh mode change 100644 => 100755 rpms/stalwart/resources/scripts/postinstall.sh mode change 100644 => 100755 rpms/stalwart/resources/scripts/postremove.sh mode change 100644 => 100755 rpms/stalwart/resources/scripts/preinstall.sh mode change 100644 => 100755 rpms/stalwart/resources/scripts/preremove.sh mode change 100644 => 100755 rpms/unkin-undionly-kpxe/resources/main.ipxe diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 60d9959..f6f76cf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,12 +3,24 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer + - id: check-executables-have-shebangs + - id: check-json + - id: check-added-large-files + args: ['--maxkb=500'] + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-toml - id: check-yaml args: [--allow-multiple-documents] - - id: check-merge-conflict + - id: detect-aws-credentials + args: [--allow-missing-credentials] - id: detect-private-key + - id: end-of-file-fixer + - id: forbid-new-submodules + - id: pretty-format-json + - id: trailing-whitespace + - repo: https://github.com/adrienverge/yamllint.git rev: v1.37.1 hooks: @@ -18,6 +30,7 @@ repos: "-d {extends: relaxed, rules: {line-length: disable}}", "-s", ] + - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.14.7 hooks: diff --git a/rpms/incus/resources/shutdown b/rpms/incus/resources/shutdown old mode 100644 new mode 100755 diff --git a/rpms/libfoundationdb/resources/scripts/postinstall.sh b/rpms/libfoundationdb/resources/scripts/postinstall.sh old mode 100644 new mode 100755 diff --git a/rpms/openbao-plugin-secret-consul/resources/scripts/preinstall.sh b/rpms/openbao-plugin-secret-consul/resources/scripts/preinstall.sh old mode 100644 new mode 100755 diff --git a/rpms/openbao-plugin-secret-nomad/resources/scripts/preinstall.sh b/rpms/openbao-plugin-secret-nomad/resources/scripts/preinstall.sh old mode 100644 new mode 100755 diff --git a/rpms/puppet-initial/resources/puppet-initial b/rpms/puppet-initial/resources/puppet-initial old mode 100644 new mode 100755 diff --git a/rpms/stalwart-foundationdb/resources/scripts/postinstall.sh b/rpms/stalwart-foundationdb/resources/scripts/postinstall.sh old mode 100644 new mode 100755 diff --git a/rpms/stalwart-foundationdb/resources/scripts/postremove.sh b/rpms/stalwart-foundationdb/resources/scripts/postremove.sh old mode 100644 new mode 100755 diff --git a/rpms/stalwart-foundationdb/resources/scripts/preinstall.sh b/rpms/stalwart-foundationdb/resources/scripts/preinstall.sh old mode 100644 new mode 100755 diff --git a/rpms/stalwart-foundationdb/resources/scripts/preremove.sh b/rpms/stalwart-foundationdb/resources/scripts/preremove.sh old mode 100644 new mode 100755 diff --git a/rpms/stalwart/resources/scripts/postinstall.sh b/rpms/stalwart/resources/scripts/postinstall.sh old mode 100644 new mode 100755 diff --git a/rpms/stalwart/resources/scripts/postremove.sh b/rpms/stalwart/resources/scripts/postremove.sh old mode 100644 new mode 100755 diff --git a/rpms/stalwart/resources/scripts/preinstall.sh b/rpms/stalwart/resources/scripts/preinstall.sh old mode 100644 new mode 100755 diff --git a/rpms/stalwart/resources/scripts/preremove.sh b/rpms/stalwart/resources/scripts/preremove.sh old mode 100644 new mode 100755 diff --git a/rpms/unkin-undionly-kpxe/resources/main.ipxe b/rpms/unkin-undionly-kpxe/resources/main.ipxe old mode 100644 new mode 100755