-
Notifications
You must be signed in to change notification settings - Fork 1
WIP: integration tests #23
base: develop
Are you sure you want to change the base?
Conversation
return CompletableFuture.completedFuture(Collections.singletonList(new TextEdit(this.range0, "Formatted"))); | ||
} | ||
|
||
public void didOpen(DidOpenTextDocumentParams params) { |
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.
Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
|
||
public CompletableFuture<List<? extends Location>> references(ReferenceParams params) { | ||
String uri = params.getTextDocument().getUri(); | ||
return uri.contains("test1") |
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.
Define a constant instead of duplicating this literal "test1" 6 times.
public CompletableFuture<List<? extends SymbolInformation>> symbol(WorkspaceSymbolParams params) { | ||
SymbolInformation[] symbols = new SymbolInformation[]{ | ||
new SymbolInformation("SymbA", SymbolKind.Class, new Location(this.uris.get(0), this.ranges[4])), | ||
new SymbolInformation("SymbB", SymbolKind.Enum, new Location(this.uris.get(0), this.ranges[2])) |
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.
Define a constant instead of duplicating this literal "SymbB" 3 times.
|
||
public CompletableFuture<List<? extends SymbolInformation>> symbol(WorkspaceSymbolParams params) { | ||
SymbolInformation[] symbols = new SymbolInformation[]{ | ||
new SymbolInformation("SymbA", SymbolKind.Class, new Location(this.uris.get(0), this.ranges[4])), |
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.
Define a constant instead of duplicating this literal "SymbA" 3 times.
return CompletableFuture.completedFuture(new WorkspaceEdit(changes)); | ||
} | ||
|
||
public CompletableFuture<List<? extends TextEdit>> formatting(DocumentFormattingParams params) { |
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.
Remove usage of generic wildcard type.
return CompletableFuture.completedFuture(Collections.singletonList(new TextEdit(range, StringUtils.repeat("f", length)))); | ||
} | ||
|
||
public CompletableFuture<List<? extends Command>> codeAction(CodeActionParams params) { |
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.
Remove usage of generic wildcard type.
LanguageServer.super.initialized(); | ||
} | ||
|
||
public CompletableFuture<List<? extends TextEdit>> rangeFormatting(DocumentRangeFormattingParams params) { |
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.
Remove usage of generic wildcard type.
return CompletableFuture.completedFuture(Either.forRight(new CompletionList(Arrays.asList(completionItems)))); | ||
} | ||
|
||
public CompletableFuture<List<? extends TextEdit>> onTypeFormatting(DocumentOnTypeFormattingParams params) { |
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.
Remove usage of generic wildcard type.
this.client.logMessage(new MessageParams(MessageType.Info, "DidSave")); | ||
} | ||
|
||
public CompletableFuture<List<? extends Location>> definition(TextDocumentPositionParams position) { |
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.
Remove usage of generic wildcard type.
Code Climate has analyzed commit 13133a1 and detected 107 issues on this pull request. Here's the issue category breakdown:
Note: there are 17 critical issues. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 0.2% (0.0% change). View more on Code Climate. |
Goals: