Files
AndroidJetpack/ivy-wallet/scripts/detektBaseline.sh
T
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

19 lines
514 B
Bash

#!/bin/bash
# -------------------
# 0. ROOT DIRECTORY CHECK
# -------------------
# Check if the script is being run from the root directory of the repo
if [ ! -f "settings.gradle.kts" ]; then
echo "ERROR:"
echo "Please run this script from the root directory of the repo."
exit 1
fi
./gradlew detektBaseline || exit 0
git add config/detekt/baseline.yml || exit 0
git commit -m "Add Detekt baseline" || exit 0
echo "Detekt baseline added."
echo "[SUCCESS] Detekt baseline committed. Do 'git push'."