11#! /bin/bash
22
33# Laravel Pint - Test coding standards
4- # This script runs Laravel Pint in test mode to check for coding standard issues without making changes
4+ # This script runs Laravel Pint to test the code matches standards
55
66# Get the directory where this script is located
77SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
@@ -11,13 +11,8 @@ CONFIG_FILE="$SCRIPT_DIR/pint.json"
1111
1212# Try to find pint executable in different locations
1313PINT_EXECUTABLE=" "
14- if [ -f " ./vendor/bin/pint" ]; then
15- PINT_EXECUTABLE=" ./vendor/bin/pint"
16- elif [ -f " ../../../bin/pint" ]; then
17- # When installed via Composer in vendor/synergitech/laravel-coding-standards
18- PINT_EXECUTABLE=" ../../../bin/pint"
19- elif command -v pint > /dev/null 2>&1 ; then
20- PINT_EXECUTABLE=" pint"
14+ if [ -f " ./vendor/laravel/pint/builds/pint" ]; then
15+ PINT_EXECUTABLE=" ./vendor/laravel/pint/builds/pint"
2116else
2217 echo " Error: Laravel Pint not found. Please install it with 'composer require laravel/pint --dev'"
2318 exit 1
@@ -29,6 +24,6 @@ if [ ! -f "$CONFIG_FILE" ]; then
2924 exit 1
3025fi
3126
32- # Run pint in test mode with the config file
33- echo " Testing coding standards with Laravel Pint using config: $CONFIG_FILE "
34- $PINT_EXECUTABLE --test --config=" $CONFIG_FILE "
27+ # Run pint with the config file and pass through all arguments
28+ echo " Running Laravel Pint with config: $CONFIG_FILE "
29+ $PINT_EXECUTABLE --test --config=" $CONFIG_FILE " " $@ "
0 commit comments