File tree Expand file tree Collapse file tree 6 files changed +57
-5
lines changed
cli/src/main/java/com/adacore/lkql_jit/cli
language/src/main/java/com/adacore/lkql_jit/checker/built_ins
testsuite/tests/gnatcheck_errors/generic_inst_walking Expand file tree Collapse file tree 6 files changed +57
-5
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ protected int executeScript(Context.Builder contextBuilder) {
223223 try {
224224 optionsBuilder .files (Files .readAllLines (Paths .get (this .args .filesFrom )));
225225 } catch (IOException e ) {
226- System .err .println ("Could not read file: " + this .args .filesFrom );
226+ System .err .println ("WORKER_ERROR: Could not read file: " + this .args .filesFrom );
227227 }
228228 }
229229
Original file line number Diff line number Diff line change @@ -130,10 +130,13 @@ public Object executeGeneric(VirtualFrame frame) {
130130 visitList .addFirst (new VisitStep (stubBody , true , inSparkCode ));
131131 }
132132 } catch (Libadalang .LangkitException e ) {
133- context .println (
134- StringUtils .concat (
135- "Error during generic instantiation walking: " ,
136- e .getMessage ()));
133+ context .getDiagnosticEmitter ()
134+ .emitDiagnostic (
135+ CheckerUtils .MessageKind .ERROR ,
136+ e .getMessage (),
137+ new LalLocationWrapper (currentNode , context .linesCache ),
138+ new SourceSectionWrapper (this .callNode .getSourceSection ()),
139+ rootUnit .getFileName (true ));
137140 continue ;
138141 }
139142
Original file line number Diff line number Diff line change 1+ project Test is
2+
3+ end Test;
Original file line number Diff line number Diff line change 1+ procedure Test is
2+ package I is new PP (4 );
3+ begin
4+ null ;
5+ end ;
Original file line number Diff line number Diff line change 1+ Total gnatcheck failures: 1
2+ 1. Summary
3+
4+ fully compliant sources : 0
5+ sources with exempted violations only : 0
6+ sources with non-exempted violations : 0
7+ unverified sources : 1
8+ total sources : 1
9+ ignored sources : 0
10+
11+ non-exempted violations : 0
12+ rule exemption warnings : 0
13+ compilation errors : 0
14+ exempted violations : 0
15+ internal errors : 1
16+
17+ 2. Exempted Coding Standard Violations
18+
19+ no exempted violations detected
20+
21+ 3. Non-exempted Coding Standard Violations
22+
23+ no non-exempted violations detected
24+
25+ 4. Rule exemption problems
26+
27+ no rule exemption problems detected
28+
29+ 5. Language violations
30+
31+ no language violations detected
32+
33+ 6. Gnatcheck internal errors
34+
35+ test.adb:2:04: error: internal issue at checker.lkql:4:22: test.adb:2:4-2:28: dereferencing a null access [/test.adb]
36+
37+ >>>program returned status code 2
Original file line number Diff line number Diff line change 1+ driver : gnatcheck
2+ project : prj.gpr
3+ rules :
4+ - +Rderiving_from_predefined_type
You can’t perform that action at this time.
0 commit comments