Info messages are highlighted as errors when they have a reference to a second line and column numbers
Nobody has claimed this yet.
- Dominant language
- Ada
- Stars
- 117
- Forks
- 49
- Avg merge
- 44m
- Merged PRs (30d)
- 8
Description
For example, in this example:
03_Proof_Of_Program_Integrity example-8
Console Output:
$ gnatprove -P main.gpr --checks-as-errors --level=0 --no-axiom-guard --report=all
Phase 1 of 2: generation of Global contracts ...
Phase 2 of 2: flow analysis and proof ...
read_record.adb:5:51: info: overflow check proved
read_record.adb:8:40: info: overflow check proved, in call inlined at read_record.adb:19
read_record.adb:8:40: info: index check proved, in call inlined at read_record.adb:19
read_record.adb:8:40: info: overflow check proved, in call inlined at read_record.adb:20
read_record.adb:8:40: info: index check proved, in call inlined at read_record.adb:20
Summary logged in /tmp/gnatprove/gnatprove.out
As the associated text says, the code is "correct and fully proved" but unless one takes a careful reading, it seems there are two errors still on lines 19 and 20, because they are highlighted in red, and when clicking the error icon is shown on those lines. It seems that all messages associated to a line and then with a second reference to another line are treated as errors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Intro to SPARK example and reproduce the shown gnatprove output in the course interface. Trace how a message with a second line and column reference is classified, then verify that informational messages no longer produce red highlights or error icons.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100