-
Notifications
You must be signed in to change notification settings - Fork 327
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
[deep link] Add sub checks for ios domain error - format error #8309
Conversation
final List<AASAfileFormatSubCheck> subcheckErrors; | ||
} | ||
|
||
IosDomainError iosFileFormatDomainError({ |
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 this be a static method on IosDomainError for consistency with how the other errors are defined?
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.
updated, thanks!
packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_services.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_model.dart
Outdated
Show resolved
Hide resolved
|
||
static const appLinksFormat = AASAfileFormatSubCheck( | ||
'Applinks format', | ||
'This test checks if the `applinks` property holds an object.', |
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: in all the error explanations above, we use the verbiage "checks that" instead of "checks if". Let's use "checks that" where applicable in these errors for consistency
packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_model.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_model.dart
Outdated
Show resolved
Hide resolved
'This test checks for `applinks.details.default`. Ref - ' | ||
'https://developer.apple.com/documentation/bundleresources/applinks/details/default' | ||
'This checks if the `Defaults` property only holds `caseSensitive` and' | ||
'`percentEncoded`.', |
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.
same comment as above for the applinks.defaults property
|
||
static const componentPathFormat = AASAfileFormatSubCheck( | ||
'Applinks details components path format', | ||
'This test checks if the `applinks.details.components.path` property only holds a string.', |
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: we should be consistent with whether we capitalize "s" in the word string throughout these errors
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.
good catch!
packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_model.dart
Outdated
Show resolved
Hide resolved
edc85e5
to
d598708
Compare
d598708
to
69524b2
Compare
static const appLinksFormat = AASAfileFormatSubCheck( | ||
'Applinks format', | ||
'This test checks that the `applinks` property holds an object.', | ||
); |
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: new line between class members here and below
); | ||
static const componentCommentFormat = AASAfileFormatSubCheck( | ||
'Applinks details components comment format', | ||
'This test checks that the `applinks.details.components.comment` property only holds a string.', |
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 we have a lot of duplicated strings here. We could reduce the duplication by adding a helper method:
String propertyTypeMessage({required String property, required String expectedType}) {
return 'This test checks that the `$property` property only holds a $expectedType.';
}
'DETAIL_FORMAT': AASAfileFormatSubCheck.detailsFormat, | ||
'DETAIL_APP_ID_FORMAT': AASAfileFormatSubCheck.detailsAppIdFormat, | ||
'DETAIL_PATHS_FORMAT ': AASAfileFormatSubCheck.detailsPathsFormat, | ||
'DETAIL_DEFAULTS_FORMAT': AASAfileFormatSubCheck.detailsDefaultsFormat, | ||
'DETAIL_DEFAULTS_PERCENT_ENCODED_FORMAT': | ||
AASAfileFormatSubCheck.detailsDefaultsPercentEncodedFormat, | ||
'DETAIL_DEFAULTS_CASE_SENSITIVE_FORMAT ': | ||
AASAfileFormatSubCheck.detailsDefaultsCaseSensitiveFormat, |
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: use DETAILS instead of DETAIL to match plurality of "details" in the map values
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 agree DETAILS instead of DETAIL here is better but the strings here like DETAIL_DEFAULTS_PERCENT_ENCODED_FORMAT are copied from ads validation protos and I have to follow them.
resolve comments lint lint add tests Update deep_links_services.dart Update deep_links_services.dart UI Update deep_links_model.dart add subchecks Update deep_links_model.dart 1
69524b2
to
67c37d4
Compare
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR.
Please add a note to
packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
if your change requires release notes. Otherwise, add the 'release-notes-not-required' label to the PR.Pre-launch Checklist
///
).If you need help, consider asking for help on Discord.