-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[tool] Move Android lint checks #3816
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,4 +151,19 @@ class RepositoryPackage { | |
| .map((FileSystemEntity entity) => | ||
| RepositoryPackage(entity as Directory)); | ||
| } | ||
|
|
||
| /// Returns the package that this package is a part of, if any. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a "package" or an "example" or both? Could be a little clearer here.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's vague because it could be anything when you call it. E.g., it's valid to call this on If it returns a non-null value it's probably an example in practice in our repo, but even that's not guaranteed. Take https://github.com/flutter/packages/tree/main/packages/pigeon/platform_tests/shared_test_plugin_code for example, which is not an example, but is a package that's part of the |
||
| /// | ||
| /// Currently this is limited to checking up two directories, since that | ||
| /// covers all the example structures currently used. | ||
| RepositoryPackage? getEnclosingPackage() { | ||
| final Directory parent = directory.parent; | ||
| if (isPackage(parent)) { | ||
| return RepositoryPackage(parent); | ||
| } | ||
| if (isPackage(parent.parent)) { | ||
| return RepositoryPackage(parent.parent); | ||
| } | ||
| return null; | ||
| } | ||
| } | ||
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.
This was here instead of in the example build.gradle because unlike with all of our actual plugins we don't need to worry about breaking clients, and so it was easier to just have it here. But now that we're enforcing uniformity, it's easier to make it match the rest of the plugins instead of carving out an exception.