Skip to content

Commit fdafe0c

Browse files
committed
Merge branch 'topic/rule_parsing_error_code' into 'master'
Ensure error return code when worker is emitting an error message Closes #260 See merge request eng/libadalang/langkit-query-language!332
2 parents e255ee3 + e69927f commit fdafe0c

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

lkql_checker/src/gnatcheck-compiler.adb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ package body Gnatcheck.Compiler is
520520
and then Line (1 .. 14) = "WORKER_ERROR: "
521521
then
522522
Error (Line (15 .. Line_Len));
523+
Detected_Internal_Error := @ + 1;
523524
Errors := True;
524525
else
525526
Analyze_Line (Line (1 .. Line_Len));
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
procedure Main is
2+
begin
3+
null;
4+
end Main;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@check(message="blah")
2+
fun test(node) =
3+
blah
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
gnatcheck: test.lkql:3:05: Unknown symbol: blah
2+
gnatcheck: Errors during analysis
3+
1. Summary
4+
5+
fully compliant sources : 1
6+
sources with exempted violations only : 0
7+
sources with non-exempted violations : 0
8+
unverified sources : 0
9+
total sources : 1
10+
ignored sources : 0
11+
12+
non-exempted violations : 0
13+
rule exemption warnings : 0
14+
compilation errors : 0
15+
exempted violations : 0
16+
internal errors : 2
17+
18+
2. Exempted Coding Standard Violations
19+
20+
no exempted violations detected
21+
22+
3. Non-exempted Coding Standard Violations
23+
24+
no non-exempted violations detected
25+
26+
4. Rule exemption problems
27+
28+
no rule exemption problems detected
29+
30+
5. Language violations
31+
32+
no language violations detected
33+
34+
6. Gnatcheck internal errors
35+
36+
37+
>>>program returned status code 2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
driver: gnatcheck
2+
rules_dirs:
3+
- rules
4+
input_sources:
5+
- main.adb
6+
rules:
7+
- +RTest

0 commit comments

Comments
 (0)