#!/bin/sh # # Pre-commit hook that runs Spotless check to ensure code formatting standards. # To install this hook, run from the repository root: # git config core.hooksPath .githooks # echo "Running Spotless check..." # Run spotless check mvn spotless:check -q if [ $? -ne 0 ]; then echo "" echo "❌ Spotless check failed!" echo " Run 'mvn spotless:apply' to fix formatting issues." echo "" exit 1 fi echo "✓ Spotless check passed" exit 0