Skip to content

Fix lintDebug: formatted="false" on notification_full_level_content_big (#146)#147

Merged
almothafar merged 1 commit into
masterfrom
fix/146-lint-formatted-full-charge
Jul 13, 2026
Merged

Fix lintDebug: formatted="false" on notification_full_level_content_big (#146)#147
almothafar merged 1 commit into
masterfrom
fix/146-lint-formatted-full-charge

Conversation

@almothafar

Copy link
Copy Markdown
Owner

Fixes #146.

./gradlew lintDebug is currently red on master — 4 StringFormatInvalid errors, a regression from #114.

Cause

notification_full_level_content_big is shown via NotificationServicegetString(...) with no format args, so its literal % signs (100%, 20%, 80%) should print verbatim. Lint reads them as malformed format specifiers.

Its two siblings from the same #114 PR — how_battery_health_works and battery_reading_unreliable_dialog_message — already carry formatted="false" for the identical "20% and 80%" wording. This one just missed it.

Fix

Add formatted="false" in both values/strings.xml and values-ar/strings.xml. One attribute, two lines, no wording/behaviour change.

Verified

  • ./gradlew lintDebugBUILD SUCCESSFUL (was 4 errors)

Note (out of scope)

CI runs tests + assembleDebug + assembleRelease but not lintDebug, which is why this slipped through. Adding lint to CI is a separate discussion.

🤖 Generated with Claude Code

The string is shown via getString() with no format args, so its literal
"%" signs (100%, 20%, 80%) are meant to print verbatim. Lint read them
as malformed format specifiers, failing lintDebug on master with 4
StringFormatInvalid errors — a regression from #114.

Its two sibling strings from the same #114 PR (how_battery_health_works,
battery_reading_unreliable_dialog_message) already carry formatted="false"
for the identical "20% and 80%" wording; this one just missed it. Add it
in both values/ and values-ar/.

CI does not run lintDebug (only tests + assembleDebug + assembleRelease),
which is why it slipped through.

Closes #146

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@almothafar
almothafar merged commit a0e3072 into master Jul 13, 2026
2 checks passed
@almothafar
almothafar deleted the fix/146-lint-formatted-full-charge branch July 13, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lint: notification_full_level_content_big missing formatted="false" → lintDebug red on master

1 participant