Skip to content

Commit 85c080e

Browse files
committed
Merge branch 'topic/422-2' into 'master'
gnatcheck: fix issues introduced in !383 See merge request eng/libadalang/langkit-query-language!389
2 parents df30fb0 + 0bab385 commit 85c080e

File tree

8 files changed

+13
-12
lines changed

8 files changed

+13
-12
lines changed

lkql_checker/src/gnatcheck-diagnoses.adb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,8 +2629,7 @@ package body Gnatcheck.Diagnoses is
26292629
User_Info_File_Full_Path := new String'
26302630
(GNAT.OS_Lib.Normalize_Pathname
26312631
(Fname,
2632-
Resolve_Links => False,
2633-
Case_Sensitive => False));
2632+
Resolve_Links => False));
26342633
else
26352634
Error (Fname & " not found, --include-file option ignored");
26362635
end if;

lkql_jit/language/src/main/java/com/adacore/lkql_jit/checker/built_ins/NodeCheckerFunction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ public Object alwaysTrue(VirtualFrame frame, Libadalang.AdaNode root) {
110110
CheckerUtils.MessageKind.ERROR,
111111
e.getMessage(),
112112
new LalLocationWrapper(currentNode, context.linesCache),
113-
new SourceSectionWrapper(this.callNode.getSourceSection()),
114-
rootUnit.getFileName(true));
113+
new SourceSectionWrapper(this.callNode.getSourceSection()));
115114
continue;
116115
}
117116

testsuite/drivers/gnatcheck_driver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,8 @@ def run_one_test(test_data: dict[str, any]) -> None:
519519

520520
@property
521521
def output_refiners(self) -> list[OutputRefiner]:
522-
result = super().output_refiners + [ReplacePath(self.working_dir())]
522+
result = super().output_refiners
523+
result.append(Substitute(self.working_dir(), "<working-dir>"))
523524
if self.test_env.get("canonicalize_backslashes", False):
524525
result.append(Substitute("\\", "/"))
525526
return result
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
With target in project file
22
===========================
33

4-
<gnatcheck_worker_exe> -Pwith_target.gpr --target=x86_64-linux -d --files-from=/gnatcheck/gnatcheck-files1.TMP --rules-from=/gnatcheck/gnatcheck-rules0.TMP
4+
<gnatcheck_worker_exe> -Pwith_target.gpr --target=x86_64-linux -d --files-from=<working-dir>/gnatcheck/gnatcheck-files1.TMP --rules-from=<working-dir>/gnatcheck/gnatcheck-rules0.TMP
55
main.adb:3:04: goto statement
66

77
With target in config file
88
==========================
99

10-
<gnatcheck_worker_exe> -Pwithout_target.gpr --target=x86_64-linux -d --files-from=/gnatcheck/gnatcheck-files1.TMP --rules-from=/gnatcheck/gnatcheck-rules0.TMP
10+
<gnatcheck_worker_exe> -Pwithout_target.gpr --target=x86_64-linux -d --files-from=<working-dir>/gnatcheck/gnatcheck-files1.TMP --rules-from=<working-dir>/gnatcheck/gnatcheck-rules0.TMP
1111
main.adb:3:04: goto statement
1212

1313
With target through command-line
1414
================================
1515

16-
<gnatcheck_worker_exe> -Pwithout_target.gpr --target=x86_64-linux -d --files-from=/gnatcheck/gnatcheck-files1.TMP --rules-from=/gnatcheck/gnatcheck-rules0.TMP
16+
<gnatcheck_worker_exe> -Pwithout_target.gpr --target=x86_64-linux -d --files-from=<working-dir>/gnatcheck/gnatcheck-files1.TMP --rules-from=<working-dir>/gnatcheck/gnatcheck-rules0.TMP
1717
main.adb:3:04: goto statement
1818

1919
Without any target specified
2020
============================
2121

22-
<gnatcheck_worker_exe> -Pwithout_target.gpr --target=x86_64-linux -d --files-from=/gnatcheck/gnatcheck-files1.TMP --rules-from=/gnatcheck/gnatcheck-rules0.TMP
22+
<gnatcheck_worker_exe> -Pwithout_target.gpr --target=x86_64-linux -d --files-from=<working-dir>/gnatcheck/gnatcheck-files1.TMP --rules-from=<working-dir>/gnatcheck/gnatcheck-rules0.TMP
2323
main.adb:3:04: goto statement

testsuite/tests/gnatcheck_errors/generic_inst_walking/test.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ Total gnatcheck failures: 1
3232

3333
6. Gnatcheck internal errors
3434

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]
35+
<working-dir>/test.adb:2:04: error: internal issue at checker.lkql:4:22: test.adb:2:4-2:28: dereferencing a null access
3636

3737
>>>program returned status code 2
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
driver: gnatcheck
22
project: prj.gpr
3+
extra_args: ['-l']
34
rules:
45
- +Rderiving_from_predefined_type
6+
canonicalize_backslashes: True
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
prj.gpr:2:26: error: "/invalid_source_dirs" is not a valid directory
1+
prj.gpr:2:26: error: "<working-dir>/invalid_source_dirs" is not a valid directory
22
try "gnatcheck --help" for more information.
33
>>>program returned status code 2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
prj.gpr:2:26: error: "\invalid_source_dirs" is not a valid directory
1+
prj.gpr:2:26: error: "<working-dir>\invalid_source_dirs" is not a valid directory
22
try "gnatcheck --help" for more information.
33
>>>program returned status code 2

0 commit comments

Comments
 (0)