-
Notifications
You must be signed in to change notification settings - Fork 54
@W-10459675@: Part 1 of several. Added NamespaceAccessible-annotated methods as sources. #735
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
Conversation
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
|
|
||
| [*.java] |
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.
The yarn build task does some automatic refactoring of the code, and one of the changes it does is tabs-to-spaces. So might as well have code be written with spaces by default.
(Personally, my preference is tabs, but I don't think I care enough to pick a fight about it.)
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 is possibly caused by our addition of googleformat to gradle build. I'm okay with either. Though I suppose switching back to tabs is going to create a large CL.
| return getMethodsWithAnnotation(g, targetFiles, Schema.NAMESPACE_ACCESSIBLE); | ||
| } | ||
|
|
||
| static List<MethodVertex> getMethodsWithAnnotation( |
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.
Package-private instead of true-private, so that we can have one parameterized test for this method instead of a bunch of tests for each invocation of it.
| * other types of vertices that are excluded from the query. Exclude test classes and methods | ||
| */ | ||
| @Test | ||
| public void testGetAuraEnabledMethods() { |
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.
For some reason, we have two MethodUtilTest.java files. This one is in build instead of ops, which led me to conclude that it's the one that should ultimately be deleted. But for now, I'm just moving the Aura-Enabled test into the other file.
| containsString(EventKey.WARNING_MULTIPLE_METHOD_TARGET_MATCHES.getMessageKey())); | ||
| } | ||
|
|
||
| @ValueSource(strings = {Schema.AURA_ENABLED, Schema.NAMESPACE_ACCESSIBLE}) |
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 is a parameterized refactor of the aura-enabled test in the other test file, also covering NamespaceAccessible and any other annotations we add support for.
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 we also have a test at a higher level to see if NameAccessible annotations are recognized as entry points?
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.
Probably. I'll add that first thing tomorrow.
2bae7cd to
9164a2e
Compare
This PR does the following:
@NamespaceAccessible-annotated methods as valid sources forApexFlsViolationRule.