Skip to content

Pass merged manifest to Android Lint - #23

Open
arunkumar9t2 wants to merge 6 commits into
Bencodes:mainfrom
arunkumar9t2:arun/pass-merged-manifest
Open

Pass merged manifest to Android Lint#23
arunkumar9t2 wants to merge 6 commits into
Bencodes:mainfrom
arunkumar9t2:arun/pass-merged-manifest

Conversation

@arunkumar9t2

@arunkumar9t2arunkumar9t2 commented Dec 15, 2023

Copy link
Copy Markdown
Contributor

Pass android merged manifest to Android Lint.

Implementation inspired from:
https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt;l=1907

  • Update examples to include a manifest lint error

@Bencodes

Copy link
Copy Markdown
Owner

@arunkumar9t2 thanks for the PR! Are you able to take a look at the failing tests?

@arunkumar9t2
arunkumar9t2force-pushed the arun/pass-merged-manifest branch from c5e0f61 to 382228fCompareDecember 22, 2023 15:32
@arunkumar9t2
arunkumar9t2force-pushed the arun/pass-merged-manifest branch from ef991c7 to 7cb874aCompareApril 15, 2024 16:53
Comment threadrules/impl.bzl
# Append the Android manifest file. Lint requires that the input manifest files be named
# exactly `AndroidManifest.xml`.
manifest = ctx.file.manifest
if manifest and manifest.basename != "AndroidManifest.xml":

@arunkumar9t2arunkumar9t2Apr 15, 2024

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint does seem to work when we pass the file as-is - here it is passed as LibManifest.xml and baseline does report issues. Please let me know if there is any case I missed.

@arunkumar9t2

Copy link
Copy Markdown
ContributorAuthor

@Bencodes, please take a look, fixed tests.

Sign up for freeto 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.

2 participants

@arunkumar9t2@Bencodes