mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-08 00:20:15 +02:00
fix: exclude auto-generated reference.php from pre-commit CS-fixer
This commit is contained in:
@@ -4,7 +4,7 @@ setopt ERR_EXIT PIPE_FAIL NOUNSET
|
||||
# Collect staged PHP and Twig files
|
||||
STAGED_PHP=()
|
||||
while IFS= read -r file; do
|
||||
[[ -n "$file" ]] && STAGED_PHP+=("$file")
|
||||
[[ -n "$file" && "$file" != "config/reference.php" ]] && STAGED_PHP+=("$file")
|
||||
done < <(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.php$' || true)
|
||||
|
||||
STAGED_TWIG=()
|
||||
@@ -32,7 +32,7 @@ if [[ ${#STAGED_PHP[@]} -gt 0 ]]; then
|
||||
git add "${STAGED_PHP[@]}"
|
||||
|
||||
echo " → PHP-CS-Fixer"
|
||||
"${DOCKER_CMD[@]}" vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php "${STAGED_PHP[@]}"
|
||||
"${DOCKER_CMD[@]}" vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --path-mode=intersection "${STAGED_PHP[@]}"
|
||||
git add "${STAGED_PHP[@]}"
|
||||
|
||||
echo " → PHPStan"
|
||||
|
||||
Generated
-2
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
// This file is auto-generated and is for apps only. Bundles SHOULD NOT rely on its content.
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
|
||||
|
||||
Reference in New Issue
Block a user