mirror of
https://github.com/wazuh/wazuh-indexer-plugins.git
synced 2025-12-10 14:32:28 -06:00
22 lines
670 B
Bash
22 lines
670 B
Bash
#!/bin/bash
|
|
|
|
# Navigate to the root of the repository
|
|
cd "$(git rev-parse --show-toplevel)" || exit 1
|
|
|
|
# Run spotlessCheck
|
|
./gradlew spotlessCheck
|
|
|
|
# Capture the exit code
|
|
EXIT_CODE=$?
|
|
|
|
if [ $EXIT_CODE -ne 0 ]; then
|
|
echo "======================================================================================"
|
|
echo "Spotless found some formatting issues. Please run ./gradlew spotlessApply to fix them."
|
|
echo "======================================================================================"
|
|
exit 1
|
|
else
|
|
echo "==================================="
|
|
echo "Spotless check passed successfully!"
|
|
echo "==================================="
|
|
fi
|