Draft
feat(tools): add Python linter script with pytest wrapper#1
Conversation
Agent-Logs-Url: https://github.com/duhow/android-template/sessions/67d2292c-c0e4-4d68-b314-4532d6d3c8ff Co-authored-by: duhow <1145001+duhow@users.noreply.github.com>
… in linter Agent-Logs-Url: https://github.com/duhow/android-template/sessions/67d2292c-c0e4-4d68-b314-4532d6d3c8ff Co-authored-by: duhow <1145001+duhow@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
duhow
April 5, 2026 07:56
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
tools/lint.py, a single-file Python linter for the Android project that runs as a final validation step before merging.Checks performed
app/src/main/res/**/*.xmlfiles parse without errorvalues-XX/strings.xmlcontains the same keys as the basevalues/strings.xmllanguage_codesandlanguage_namesinarrays.xmlhave the same item count; non-default codes appear inlocale_config.xml(),{},[]are balanced in Kotlin/Java source files (strips strings and comments before counting)Usage
When
pytestis installed and no special flags are passed, the script delegates topytest(standard exit codes). Otherwise the built-in standalone runner is used (exit code = failed check count, capped at 125).Changes
tools/lint.py— new linter script (argparse, no click; pytest-compatibletest_*functions + standalone runner)AGENTS.md— new Linting section added after Development best practices, with instructions to run as final step.github/workflows/build.yml—Run linterstep added before the build.github/workflows/release.yml—Run linterstep added before the buildfastlane/metadata/android/en-US/changelogs/1.txt— updated