Fix: pre-commit: Skip branch check in ci (+used sed in codespell exceptions generation) (#27499)

* Use 'sed' instead of 'perl' (sed is more common)

* Skip branch check in ci
This commit is contained in:
MDW
2024-01-14 15:00:01 +01:00
committed by GitHub
parent 5bfccb7016
commit 43bb558ae9
2 changed files with 2 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ fi
# - Run codespell;
# - For each line, create a grep command to find the lines;
# - Execute that command by evaluation
codespell . | perl -p -e 's@^(.*?):\d+:\s(\S+)\s.*@grep -P '"'"'\\b$2\\b'"'"' "$1" >> '"${codespell_ignore_file}"'@;' | \
codespell . | sed -n -E 's@^([^:]+):[[:digit:]]+:[[:space:]](\S+)[[:space:]].*@grep -P '\''\\b\2\\b'\'' "\1" >> '"${codespell_ignore_file}"'@p' | \
while read -r line ; do eval "$line" ; done
# Finally, sort and remove duplicates to make merges easier.