implements PLN-0136
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 63.75% (19407/30442)
* Branch Coverage: 54.17% (7740/14289)
* Lines of Code: 30442
* Cyclomatic Complexity: 12365
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 685
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 63.75% (19407/30442)
* Branch Coverage: 54.17% (7740/14289)
* Lines of Code: 30442
* Cyclomatic Complexity: 12365
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 685
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Add PBS quick fixes as frontend-owned repairs transported by the LSP. Duplicate reserved attributes are deleted at the extra span. Interface InitAllowed attributes with arguments become [InitAllowed]. The server matches Diagnostic.code plus range, does not parse messages, and returns an empty list when the capability or the fix is absent. Housekeep DSC-0044 with LSN-0073.
This commit is contained in:
+32
@@ -30,6 +30,38 @@ class FrontendLanguageServiceTest {
|
||||
assertTrue(service.prepareRename(request, 0).isEmpty());
|
||||
assertEquals(FrontendRenameResult.Status.UNSUPPORTED, service.rename(request, 0, "renamed").status());
|
||||
assertTrue(service.rename(request, 0, "renamed").edits().isEmpty());
|
||||
assertFalse(service.codeActionsSupported());
|
||||
assertTrue(service.codeActions(request).isEmpty());
|
||||
assertTrue(service.codeActions(request, null).isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
void codeActionAllowsEmptyReplacementAndRejectsBlankIdentity() {
|
||||
final Path path = Path.of("src/main.pbs").toAbsolutePath();
|
||||
final var action = new FrontendCodeAction(
|
||||
" Remove duplicate reserved attribute ",
|
||||
" E_SEM_DUPLICATE_RESERVED_ATTRIBUTE ",
|
||||
path,
|
||||
4,
|
||||
12,
|
||||
"");
|
||||
assertEquals("Remove duplicate reserved attribute", action.title());
|
||||
assertEquals("E_SEM_DUPLICATE_RESERVED_ATTRIBUTE", action.diagnosticCode());
|
||||
assertEquals("", action.newText());
|
||||
assertThrows(IllegalArgumentException.class, () -> new FrontendCodeAction(
|
||||
" ",
|
||||
"E_SEM_DUPLICATE_RESERVED_ATTRIBUTE",
|
||||
path,
|
||||
0,
|
||||
1,
|
||||
""));
|
||||
assertThrows(NullPointerException.class, () -> new FrontendCodeAction(
|
||||
"Remove duplicate reserved attribute",
|
||||
"E_SEM_DUPLICATE_RESERVED_ATTRIBUTE",
|
||||
path,
|
||||
0,
|
||||
1,
|
||||
null));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user