diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2ac96991403..ef5560682ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.(?!github/workflows)[^/]*/.*))$ repos: # Several miscellaneous checks and fix (on yaml files, end of files fix) - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: # This hook tests the name of the branch and return an error if the name is # 'develop' or an official version 'x.y' @@ -60,13 +60,13 @@ repos: # Gitleaks is a SAST tool for detecting and preventing hardcoded secrets like passwords, api keys, and tokens in git repos - repo: https://github.com/gitleaks/gitleaks.git - rev: v8.24.0 + rev: v8.29.0 hooks: - id: gitleaks # Check github actions - repo: https://github.com/rhysd/actionlint - rev: v1.7.7 + rev: v1.7.8 hooks: - id: actionlint @@ -193,7 +193,7 @@ repos: # Check format of yaml files - repo: https://github.com/adrienverge/yamllint.git - rev: v1.36.2 + rev: v1.37.1 hooks: - id: yamllint args: @@ -246,7 +246,7 @@ repos: # Check some shell scripts - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 + rev: v0.11.0.1 hooks: - id: shellcheck args: [-W, "100"] diff --git a/dev/setup/git/hooks/pre-commit.legacy b/dev/setup/git/hooks/pre-commit.legacy index 57c722abd49..06d44ca5b80 100755 --- a/dev/setup/git/hooks/pre-commit.legacy +++ b/dev/setup/git/hooks/pre-commit.legacy @@ -33,7 +33,7 @@ do result1=$? - if [ "x$result1" != "x0" ] + if [ "$result1" != "0" ] then echo "Fix the error before commit." 1>&2 exit 1 @@ -56,10 +56,10 @@ then result2=$? - if [ "x$result2" != "x0" ] + if [ "$result2" != "0" ] then # Fix standard errors - if [ "x$AUTOFIX" != "x0" ] + if [ "$AUTOFIX" != "0" ] then # shellcheck disable=2086,2090 "${DIRPHPCS}phpcbf" -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES diff --git a/dev/tools/optimize_images.sh b/dev/tools/optimize_images.sh index 4bc917e5f5f..7bbfec3fbbd 100755 --- a/dev/tools/optimize_images.sh +++ b/dev/tools/optimize_images.sh @@ -1,8 +1,10 @@ #!/bin/bash +# Copyright (C) 2025 MDW + # Borrowed from https://gist.github.com/lgiraudel/6065155 # Inplace mode added by Raphaƫl Doursenaud -# shellcheck disable=2003,2006,2034,2046,2086,2166,2268 +# shellcheck disable=2003,2006,2034,2046,2086,2166,2268,2327,2328 PROGNAME=${0##*/} INPUT=''