Skip to content

Commit 5b03e2a

Browse files
committed
Forbid '--target' and '--RTS' in GNATcheck switches
Do this because similar GPR attributes already exist.
1 parent 212121e commit 5b03e2a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lkql_checker/doc/gnatcheck_rm/using_gnatcheck.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ GNATcheck:
380380
* ``-eL``
381381
* ``-r, --rule [rule_name]`` (use ``Rules`` attribute instead)
382382
* ``--rule-file=filename`` (use ``Rule_File`` attribute instead)
383+
* ``--target`` (use the ``Target`` GPR attribute instead)
384+
* ``--RTS`` (use the ``Runtime`` GPR attribute instead)
383385

384386
If you're providing one of those switches through the ``Switches`` or the
385387
``Default_Switches`` attribute, GNATcheck will emit an error message and

lkql_checker/src/gnatcheck-projects.adb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,8 @@ package body Gnatcheck.Projects is
12681268
Disallow (Arg.Follow_Symbolic_Links.This, "-eL" & In_Project_Msg);
12691269
Disallow (Arg.Rules.This, "-r" & In_Project_Msg);
12701270
Disallow (Arg.Rule_File.This, "--rule-file" & In_Project_Msg);
1271+
Disallow (Arg.Target.This, "--target" & In_Project_Msg);
1272+
Disallow (Arg.RTS.This, "--RTS" & In_Project_Msg);
12711273
end;
12721274
end if;
12731275

@@ -1291,6 +1293,8 @@ package body Gnatcheck.Projects is
12911293
Allow (Arg.Follow_Symbolic_Links.This);
12921294
Allow (Arg.Rules.This);
12931295
Allow (Arg.Rule_File.This);
1296+
Allow (Arg.Target.This);
1297+
Allow (Arg.RTS.This);
12941298
end if;
12951299

12961300
loop

0 commit comments

Comments
 (0)