Custom CheckStyle: Batch 2, Rule #5 and #10; Batch 3, Rule #1 and #6#4712
Merged
Conversation
added 4 commits
July 10, 2019 23:34
added 3 commits
July 30, 2019 14:56
JonathanGiles
requested changes
Aug 12, 2019
vhvb1989
requested changes
Aug 12, 2019
vhvb1989
left a comment
Member
There was a problem hiding this comment.
asking just for a few code enhacements
| // VARIABLE_DEF token will always MODIFIERS token. If there is no modifier at the variable, no child under | ||
| // MODIFIERS token. Also the previous sibling of OBJBLOCK will always be class name IDENT node. | ||
| if (!modifiersToken.branchContains(TokenTypes.FINAL)) { | ||
| log(modifiersToken, String.format("The variable field ''%s'' of class ''%s'' should be final. Classes annotated with @ServiceClient are supposed to be immutable.", |
Member
There was a problem hiding this comment.
update this for to use TokenUtil.forEachChild(token, condition, predicate -> ….)
Contributor
Author
There was a problem hiding this comment.
not sure why to use forEachChild here.
srnagar
requested changes
Aug 12, 2019
alzimmermsft
requested changes
Aug 12, 2019
added 2 commits
August 20, 2019 15:44
added 9 commits
August 20, 2019 17:11
…into CS-Service-Method
…into CS-Service-Method
…into CS-Service-Method
conniey
reviewed
Aug 28, 2019
conniey
reviewed
Aug 28, 2019
conniey
approved these changes
Aug 28, 2019
conniey
left a comment
Member
There was a problem hiding this comment.
Some feedback to address. Should be easy.
added 2 commits
August 28, 2019 10:58
conniey
approved these changes
Aug 28, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch 2
Rule # 5
Service client methods: All methods that are in a class annotated with @ServiceClient, where the method has a @ServiceMethod annotation, should follow these rules:
Rule # 10
'withResponse' naming pattern: All methods annotated with @ServiceMethod that return a Response (or Mono) must have their method name end with 'withResponse'. If the service method does not return a Response or Mono, it must not end with 'withResponse'.
Batch 3
Rule # 1
Context in all the right places: Context should be passed in as an argument to all public methods annotated with @ServiceMethod that return Response in sync clients.
Rule # 6
Async client should have
async = trueproperty set in @ServiceClient annotationChange class Context to be final