-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42637 from nipunayf/fix-42507
Support `Add 'check' error` code action for call statements
- Loading branch information
Showing
12 changed files
with
432 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
42 changes: 42 additions & 0 deletions
42
...ver-core/src/test/resources/codeaction/add-check/config/add_check_on_call_statement1.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"position": { | ||
"line": 1, | ||
"character": 4 | ||
}, | ||
"source": "add_check_on_call_statement.bal", | ||
"expected": [ | ||
{ | ||
"title": "Add 'check' error", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 1, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "check " | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 16 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 16 | ||
} | ||
}, | ||
"newText": " returns error?" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
42 changes: 42 additions & 0 deletions
42
...ver-core/src/test/resources/codeaction/add-check/config/add_check_on_call_statement2.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"position": { | ||
"line": 6, | ||
"character": 9 | ||
}, | ||
"source": "add_check_on_call_statement.bal", | ||
"expected": [ | ||
{ | ||
"title": "Add 'check' error", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 6, | ||
"character": 8 | ||
}, | ||
"end": { | ||
"line": 6, | ||
"character": 8 | ||
} | ||
}, | ||
"newText": "check " | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 4, | ||
"character": 33 | ||
}, | ||
"end": { | ||
"line": 4, | ||
"character": 33 | ||
} | ||
}, | ||
"newText": " returns error?" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
42 changes: 42 additions & 0 deletions
42
...ver-core/src/test/resources/codeaction/add-check/config/add_check_on_call_statement3.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"position": { | ||
"line": 14, | ||
"character": 17 | ||
}, | ||
"source": "add_check_on_call_statement.bal", | ||
"expected": [ | ||
{ | ||
"title": "Add 'check' error", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 14, | ||
"character": 16 | ||
}, | ||
"end": { | ||
"line": 14, | ||
"character": 16 | ||
} | ||
}, | ||
"newText": "check " | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 10, | ||
"character": 23 | ||
}, | ||
"end": { | ||
"line": 10, | ||
"character": 23 | ||
} | ||
}, | ||
"newText": " returns error?" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
42 changes: 42 additions & 0 deletions
42
...ver-core/src/test/resources/codeaction/add-check/config/add_check_on_call_statement4.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"position": { | ||
"line": 22, | ||
"character": 9 | ||
}, | ||
"source": "add_check_on_call_statement.bal", | ||
"expected": [ | ||
{ | ||
"title": "Add 'check' error", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 22, | ||
"character": 8 | ||
}, | ||
"end": { | ||
"line": 22, | ||
"character": 8 | ||
} | ||
}, | ||
"newText": "check " | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 20, | ||
"character": 16 | ||
}, | ||
"end": { | ||
"line": 20, | ||
"character": 16 | ||
} | ||
}, | ||
"newText": " returns error?" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
42 changes: 42 additions & 0 deletions
42
...ver-core/src/test/resources/codeaction/add-check/config/add_check_on_call_statement5.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"position": { | ||
"line": 28, | ||
"character": 10 | ||
}, | ||
"source": "add_check_on_call_statement.bal", | ||
"expected": [ | ||
{ | ||
"title": "Add 'check' error", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 28, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 28, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "check " | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 26, | ||
"character": 16 | ||
}, | ||
"end": { | ||
"line": 26, | ||
"character": 16 | ||
} | ||
}, | ||
"newText": " returns error?" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
42 changes: 42 additions & 0 deletions
42
...ver-core/src/test/resources/codeaction/add-check/config/add_check_on_call_statement6.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"position": { | ||
"line": 29, | ||
"character": 9 | ||
}, | ||
"source": "add_check_on_call_statement.bal", | ||
"expected": [ | ||
{ | ||
"title": "Add 'check' error", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 29, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 29, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "check " | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 26, | ||
"character": 16 | ||
}, | ||
"end": { | ||
"line": 26, | ||
"character": 16 | ||
} | ||
}, | ||
"newText": " returns error?" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
Oops, something went wrong.