Files
Claude e7b52f512b Fix all Android Lint warnings and enforce lint in git hooks
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
2026-07-06 10:40:15 +00:00

25 lines
782 B
Bash

#!/bin/bash
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
echo "*********************************************************"
echo "Running git pre-push hook. Running tests and Android Lint... "
echo "*********************************************************"
./gradlew test lint
status=$?
if [ "$status" = 0 ] ; then
echo "All tests and lint checks passed."
exit 0
else
echo "*********************************************************"
echo 1>&2 "Failing tests or lint checks"
printf "Run ${GREEN}./gradlew test${NO_COLOR} to make sure you have all tests green before pushing...\n"
printf "Run ${GREEN}./gradlew lint${NO_COLOR} and open the report to see Android Lint issues...\n"
echo "*********************************************************"
exit 1
fi