Skip to content

Commit bcd1b69

Browse files
committed
Add --config switch to gnatcheck
Also modify .gitatributes to treat company logo as a binary because it gets in the way of pushing changes. Issue eng/libadalang/langkit-query-language#172
1 parent 5d2db9e commit bcd1b69

File tree

5 files changed

+269
-93
lines changed

5 files changed

+269
-93
lines changed

Diff for: .gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ testsuite/ada_projects/*/*.ad[bs] no-precommit-check
1010
# No needs
1111
*.java no-precommit-check
1212

13+
*.png -text

Diff for: lkql_checker/lalcheck/gnatcheck-compiler.adb

+13-6
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,7 @@ package body Gnatcheck.Compiler is
13941394
Split_Command : constant Slice_Set := Create (Worker_Command, " ");
13951395
Worker : String_Access := null;
13961396
Prj : constant String := Gnatcheck_Prj.Source_Prj;
1397+
CGPR : constant String := Gnatcheck_Prj.Source_CGPR;
13971398
Args : Argument_List (1 .. 128);
13981399
Num_Args : Integer := 0;
13991400

@@ -1441,14 +1442,20 @@ package body Gnatcheck.Compiler is
14411442
Args (Num_Args) := new String'(Get_Aggregated_Project);
14421443
end if;
14431444

1444-
if RTS_Path.all /= "" then
1445-
Num_Args := @ + 1;
1446-
Args (Num_Args) := new String'("--RTS=" & RTS_Path.all);
1447-
end if;
1445+
if CGPR = "" then
1446+
if RTS_Path.all /= "" then
1447+
Num_Args := @ + 1;
1448+
Args (Num_Args) := new String'("--RTS=" & RTS_Path.all);
1449+
end if;
14481450

1449-
if Target.all /= "" then
1451+
if Target.all /= "" then
1452+
Num_Args := @ + 1;
1453+
Args (Num_Args) := new String'("--target=" & Target.all);
1454+
end if;
1455+
else
1456+
-- Target and runtime will be taken from config project anyway
14501457
Num_Args := @ + 1;
1451-
Args (Num_Args) := new String'("--target=" & Target.all);
1458+
Args (Num_Args) := new String'("--config=" & CGPR);
14521459
end if;
14531460

14541461
if Debug_Mode then

Diff for: lkql_checker/lalcheck/gnatcheck-output.adb

+1
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ package body Gnatcheck.Output is
725725
Info (" --ignore-project-switches - ignore switches specified in the project file");
726726
Info (" --target=targetname - specify a target for cross platforms");
727727
Info (" --RTS=<runtime> - use runtime <runtime>");
728+
Info (" --config=<cgpr> - use configuration project <cgpr>");
728729
Info ("");
729730
Info (" -h - print out the list of the currently implemented rules");
730731
Info (" -mn - n is the maximal number of diagnoses in Stderr");

0 commit comments

Comments
 (0)