-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpint-test
More file actions
executable file
·29 lines (23 loc) · 903 Bytes
/
pint-test
File metadata and controls
executable file
·29 lines (23 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# Laravel Pint - Test coding standards
# This script runs Laravel Pint to test the code matches standards
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "$0")"; pwd -P)"
# Path to the pint.json config file
CONFIG_FILE="$SCRIPT_DIR/pint.json"
# Try to find pint executable in different locations
PINT_EXECUTABLE=""
if [ -f "./vendor/laravel/pint/builds/pint" ]; then
PINT_EXECUTABLE="./vendor/laravel/pint/builds/pint"
else
echo "Error: Laravel Pint not found. Please install it with 'composer require laravel/pint --dev'"
exit 1
fi
# Check if config file exists
if [ ! -f "$CONFIG_FILE" ]; then
echo "Error: pint.json config file not found at $CONFIG_FILE"
exit 1
fi
# Run pint with the config file and pass through all arguments
echo "Running Laravel Pint with config: $CONFIG_FILE"
$PINT_EXECUTABLE --test --config="$CONFIG_FILE" "$@"