-
Notifications
You must be signed in to change notification settings - Fork 21
Add support for Java analysis #10
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
0030b69 to
d438041
Compare
7194900 to
454d1ad
Compare
jblievremont
left a comment
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.
LGTM, with a few comments 😄
|
|
||
| Optional<ProjectBindingWrapper> binding = bindingManager.getBinding(fileUri); | ||
| AnalysisResultsWrapper analysisResults; | ||
| final Optional<GetJavaConfigResponse> javaConfigOptFinal = javaConfigOpt; |
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.
Why not make it final from the beginning?
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, that's a pre-refactoring remain
| } | ||
| } | ||
|
|
||
| private void analyzeAllOpenJavaFiles() { |
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'm wondering whether it would make sense to refactor these analyzeAllXxx methods, e.g with a method named analyzeFiles(Predicate<URI>).
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 think using predicates will make it harder to understand what this is doing. Just to save the loop, I don't think it worth factorizing. WDYT?
| analyzeAllOpenJavaFiles(); | ||
| } | ||
|
|
||
| private boolean isTest(WorkspaceFolderSettings settings, URI fileUri, Optional<GetJavaConfigResponse> javaConfig) { |
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.
👍
| @JsonRequest("sonarlint/getJavaConfig") | ||
| CompletableFuture<GetJavaConfigResponse> getJavaConfig(String fileUri); | ||
|
|
||
| public static class GetJavaConfigResponse { |
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.
Nitpick: might be worth a Javadoc link to the reference
2e6774a to
67e55c9
Compare
No description provided.