Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass merged manifest to Android Lint #23

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

arunkumar9t2
Copy link
Contributor

@arunkumar9t2 arunkumar9t2 commented Dec 15, 2023

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
Owner

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

@@ -169,9 +174,10 @@ def process_android_lint_issues(ctx, regenerate):
# 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":
Copy link
Contributor Author

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
Contributor Author

@Bencodes, please take a look, fixed tests.

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.

None yet

2 participants