-
Notifications
You must be signed in to change notification settings - Fork 8
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
XmlWebViewInsideScrollView Detector #37
XmlWebViewInsideScrollView Detector #37
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the Issue in the IssueRegistry? Only then will it be enabled.
.value("true") | ||
.build() | ||
context.report(ISSUE, | ||
context.getElementLocation(parentScrollView), LINT_ERROR_MESSAGE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Move the LINT_ERROR_MESSAGE to new line for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do
TestLintTask.lint() | ||
.files(xmlSource("res/layout/webview_inside_scrollview_wo_fill_viewport.xml", | ||
"""<?xml version="1.0" encoding="utf-8"?> | ||
<ScrollView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: These are indented weird. and <?xml version> should be on the same indent level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, let me format them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShaishavGandhi i ran a reformat on the file. Still this indent remained
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Manually formatted
Can you run spotless again? It's failing the build |
Yeah fixed |
This PR adds a lint check to make sure that Scrollview which has WebView as its child sets fillViewport to true
Add
XmlWebViewInsideScrollViewDetector
Add Unit tests