mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-09-14 00:35:08 +00:00
Lint reported 113 warnings; this fixes them and turns on warningsAsErrors so new ones fail the build. The pre-commit hook now runs `ktlintCheck lint` and the pre-push hook runs `test lint`. Fixes: - Replace "..." with the typographic ellipsis in every locale's strings.xml - Remove unused resources: psbt_amount_sats and enable_applications_backup strings, white/amber/gray colors, ic_launcher_background_white drawable - Remove launcher bitmap fallbacks (background/foreground/monochrome/round and density ic_launcher.webp): minSdk 26 always resolves the adaptive icon - Move ic_qrcode.png to drawable-nodpi - Shrink ic_tor from a declared 512dp to 24dp (only ever drawn at 20dp) - Make modifier the first optional parameter of RemoteAppIcon - Use the lambda Modifier.offset overload for the animated toggle indicator - Replace deprecated Icons.Default.Article with the AutoMirrored version - Drop a redundant when branch, opt in to resetReplayCache's experimental API Suppressed with a stated reason: ScopedStorage (legacy backup import), InsecureBaseConfiguration (local/onion ws:// relays), PluralsCandidate, VectorPath/VectorRaster (artwork), and ObsoleteSdkInt for mipmap-anydpi-v26 (AAPT cannot resolve the launcher icon from plain mipmap-anydpi). Version freshness checks are disabled so hooks stay deterministic over time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZCeWRzzk4dxptDiEZyXjM
25 lines
812 B
Bash
25 lines
812 B
Bash
#!/bin/bash
|
|
|
|
GREEN='\033[0;32m'
|
|
NO_COLOR='\033[0m'
|
|
|
|
echo "*********************************************************"
|
|
echo "Running git pre-commit hook. Running Static analysis and Android Lint... "
|
|
echo "*********************************************************"
|
|
|
|
./gradlew ktlintCheck lint
|
|
|
|
status=$?
|
|
|
|
if [ "$status" = 0 ] ; then
|
|
echo "Static analysis found no problems."
|
|
exit 0
|
|
else
|
|
echo "*********************************************************"
|
|
echo 1>&2 "Static analysis found violations it could not fix."
|
|
printf "Run ${GREEN}./gradlew ktlintFormat${NO_COLOR} to fix formatting related issues...\n"
|
|
printf "Run ${GREEN}./gradlew lint${NO_COLOR} and open the report to see Android Lint issues...\n"
|
|
echo "*********************************************************"
|
|
exit 1
|
|
fi
|