Skip to content

Commit e70a3fa

Browse files
committed
Document new SPARK integration in VS Code
1 parent 48de728 commit e70a3fa

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ section below it for the last release. -->
1111
for subprograms, packages and tasks when clicking on the `is` keyword following their declarations
1212
* New refactoring: [Delete Entity](https://github.com/AdaCore/ada_language_server/blob/master/doc/refactoring_tools.md#delete-entity)
1313
* Provide an integration of the [e3-testsuite](https://github.com/AdaCore/e3-testsuite) framework with the VS Code testing UI
14+
* Provide an interactive options picker for GNATprove invocations
15+
* Automatically open SARIF reports generated by GNATprove
1416

1517
## 26.0.202507021
1618

59.5 KB
Loading

doc/media/gnatprove-sarif.png

848 KB
Loading

doc/vscode-ug.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,36 @@ to connect to your machine or board.
311311

312312
You will also need to run the debugging utility that spawns the remote `gdbserver` before launching the debugger in VS Code ( e.g: `st-util` or `openocd` for STM32F4 boards). This can be done directly through a VS Code `Terminal` or by configuring a custom [VS Code task](https://code.visualstudio.com/docs/editor/tasks) for that purpose.
313313

314-
Once your project is setup, just open the VS Code
314+
Once your project is set up, just open the VS Code
315315
`Run and Debug` panel and then click on the `Run and Debug` button.
316316

317317
For more advanced use cases or if your program cannot be debugged remotely via GDB, you can try creating your custom VS Code debug launch configuration following [VS Code User's Guide for Launch Configurations](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations).
318318

319+
## SPARK Support
320+
321+
When working on a project with SPARK code, it is possible to call GNATprove through the following commands:
322+
323+
- `SPARK: Examine project`
324+
- `SPARK: Examine file`
325+
- `SPARK: Examine subprogram`
326+
- `SPARK: Prove project`
327+
- `SPARK: Prove file`
328+
- `SPARK: Prove subprogram`
329+
- `SPARK: Prove selected region`
330+
- `SPARK: Prove line`
331+
332+
These commands open an interactive picker to choose options before calling GNATprove.
333+
334+
It is also possible to call the options picker directly with the command `SPARK: Select GNATprove options...`.
335+
336+
![Option picker for GNATprove](media/gnatprove-option-picker.png)
337+
338+
If you prefer to invoke GNATprove without choosing options interactively, the `Tasks: Run Task` command offer non-interactive task counterparts of the above commands.
339+
340+
Starting GNATprove 26, a SARIF report is generated and opened automatically in VS Code after execution.
341+
342+
![GNATprove SARIF report](media/gnatprove-sarif.png)
343+
319344
## Working with Multiple Projects in the Same VS Code Workspace
320345

321346
It is a possible for a workspace to contain multiple GPR projects.

0 commit comments

Comments
 (0)