File tree Expand file tree Collapse file tree 4 files changed +13
-0
lines changed
testsuite/tests/gnatcheck_errors
already_existing_instance Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,10 @@ package Gnatcheck.Options is
189
189
-- This variable should contain a full list of compilation options to be
190
190
-- passed to gcc.
191
191
192
+ Instance_Help_Emitted : Boolean := False;
193
+ -- Whether the help message about the new instance system has already been
194
+ -- emitted. This message should be removed in 26.0.
195
+
192
196
-- ------------------------------------
193
197
-- Controlling the gnatcheck report --
194
198
-- ------------------------------------
Original file line number Diff line number Diff line change @@ -1051,6 +1051,13 @@ package body Gnatcheck.Rules.Rule_Table is
1051
1051
(if Instance.Defined_At /= " "
1052
1052
then To_String (Instance.Defined_At)
1053
1053
else " command line" ) & Diag_Defined_At);
1054
+ if not Instance_Help_Emitted then
1055
+ Warning
1056
+ (" if you want to pass multiple parameters to a rule you " &
1057
+ " should use the comma separated notation: e.g. " &
1058
+ " +RMy_Rule:Param1,Param2" );
1059
+ Instance_Help_Emitted := True;
1060
+ end if ;
1054
1061
Bad_Rule_Detected := True;
1055
1062
return ;
1056
1063
elsif not Enable and then Instance = null then
Original file line number Diff line number Diff line change 1
1
gnatcheck: rule instance with the same name already exists: "goto_statements" previously instantiated at command line
2
+ gnatcheck: if you want to pass multiple parameters to a rule you should use the comma separated notation: e.g. +RMy_Rule:Param1,Param2
2
3
main.adb:3:04: goto statement [goto_statements]
3
4
>>>program returned status code 5
Original file line number Diff line number Diff line change 1
1
gnatcheck: rule instance with the same name already exists: "same_alias" previously instantiated at command line
2
+ gnatcheck: if you want to pass multiple parameters to a rule you should use the comma separated notation: e.g. +RMy_Rule:Param1,Param2
2
3
gnatcheck: rule instance with the same name already exists: "comp_check" previously instantiated at command line
3
4
gnatcheck: rule instance with the same name already exists: "comp_check" previously instantiated at command line
4
5
>>>program returned status code 5
You can’t perform that action at this time.
0 commit comments