Qual: Update pre-commit hooks (#36262)
* Qual: Update pre-commit hooks # Qual: Update pre-commit hook Updated several pre-commit hooks as long as the new ones are not alpha or beta versions * Qual: Fix/ignore some shellcheck issues
This commit is contained in:
parent
f799113fac
commit
1072419141
3 changed files with 11 additions and 9 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
#!/bin/bash
|
||||
# Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
||||
# Borrowed from https://gist.github.com/lgiraudel/6065155
|
||||
# Inplace mode added by Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
|
||||
# shellcheck disable=2003,2006,2034,2046,2086,2166,2268
|
||||
# shellcheck disable=2003,2006,2034,2046,2086,2166,2268,2327,2328
|
||||
|
||||
PROGNAME=${0##*/}
|
||||
INPUT=''
|
||||
|
|
|
|||
Loading…
Reference in a new issue