Skip to content

Commit c9ce1f8

Browse files
committed
Format calls to output methods
1 parent 1c7f468 commit c9ce1f8

File tree

12 files changed

+406
-353
lines changed

12 files changed

+406
-353
lines changed

lkql_checker/src/gnatcheck-compiler.adb

Lines changed: 54 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,8 +1070,9 @@ package body Gnatcheck.Compiler is
10701070
(Lower_Rest_Name, I_Name, Cursor, Success);
10711071
if not Success and then Restriction_To_Instance (Cursor) /= I_Name
10721072
then
1073-
Error ("cannot enable the same restriction in different rule " &
1074-
"instances : " & Rest_Name);
1073+
Error
1074+
("cannot enable the same restriction in different rule "
1075+
& "instances: " & Rest_Name);
10751076
Bad_Rule_Detected := True;
10761077
return;
10771078
end if;
@@ -1087,8 +1088,9 @@ package body Gnatcheck.Compiler is
10871088
exit;
10881089

10891090
else
1090-
Error ("wrong structure of restriction rule parameter " &
1091-
Param & ", ignored");
1091+
Error
1092+
("wrong structure of restriction rule parameter " & Param
1093+
& ", ignored");
10921094
Bad_Rule_Detected := True;
10931095

10941096
return;
@@ -1099,8 +1101,9 @@ package body Gnatcheck.Compiler is
10991101
if R_Id in All_Boolean_Restrictions then
11001102

11011103
if Arg_Present then
1102-
Error ("RESTRICTIONS rule parameter: " & Param &
1103-
" can not contain expression, ignored");
1104+
Error
1105+
("RESTRICTIONS rule parameter: " & Param
1106+
& " can not contain expression, ignored");
11041107
Bad_Rule_Detected := True;
11051108
else
11061109
Restriction_Setting (R_Id).Active := True;
@@ -1109,8 +1112,9 @@ package body Gnatcheck.Compiler is
11091112
elsif R_Id /= Not_A_Restriction_Id then
11101113

11111114
if not Arg_Present then
1112-
Error ("RESTRICTIONS rule parameter: " & Param &
1113-
" should contain an expression, ignored");
1115+
Error
1116+
("RESTRICTIONS rule parameter: " & Param
1117+
& " should contain an expression, ignored");
11141118
Bad_Rule_Detected := True;
11151119

11161120
return;
@@ -1134,17 +1138,19 @@ package body Gnatcheck.Compiler is
11341138
end if;
11351139
end loop;
11361140

1137-
Error ("expression for RESTRICTIONS rule parameter: " &
1138-
Param (First_Idx .. Last_Idx) &
1139-
" is specified more than once");
1141+
Error
1142+
("expression for RESTRICTIONS rule parameter: "
1143+
& Param (First_Idx .. Last_Idx)
1144+
& " is specified more than once");
11401145
Rule_Option_Problem_Detected := True;
11411146
end if;
11421147

11431148
Restriction_Setting (R_Id).Param.Append (R_Val'Img);
11441149
exception
11451150
when Constraint_Error =>
1146-
Error ("wrong restriction parameter expression in " &
1147-
Param & ", ignored");
1151+
Error
1152+
("wrong restriction parameter expression in "
1153+
& Param & ", ignored");
11481154
Bad_Rule_Detected := True;
11491155

11501156
return;
@@ -1167,8 +1173,9 @@ package body Gnatcheck.Compiler is
11671173
case Special_R_Id is
11681174
when No_Dependence =>
11691175
if not Arg_Present then
1170-
Error ("Restrictions rule parameter: " & Param &
1171-
" should contain a unit name, ignored");
1176+
Error
1177+
("Restrictions rule parameter: " & Param
1178+
& " should contain a unit name, ignored");
11721179
Bad_Rule_Detected := True;
11731180

11741181
return;
@@ -1180,8 +1187,9 @@ package body Gnatcheck.Compiler is
11801187

11811188
when No_Use_Of_Entity =>
11821189
if not Arg_Present then
1183-
Error ("Restrictions rule parameter: " & Param &
1184-
" should contain an entity name, ignored");
1190+
Error
1191+
("Restrictions rule parameter: " & Param
1192+
& " should contain an entity name, ignored");
11851193
Bad_Rule_Detected := True;
11861194

11871195
return;
@@ -1193,8 +1201,9 @@ package body Gnatcheck.Compiler is
11931201

11941202
when No_Specification_Of_Aspect =>
11951203
if not Arg_Present then
1196-
Error ("Restrictions rule parameter: " & Param &
1197-
" should contain an aspect name, ignored");
1204+
Error
1205+
("Restrictions rule parameter: " & Param
1206+
& " should contain an aspect name, ignored");
11981207
Bad_Rule_Detected := True;
11991208

12001209
return;
@@ -1226,8 +1235,9 @@ package body Gnatcheck.Compiler is
12261235
Static_Dispatch_Tables |
12271236
No_Exception_Propagation
12281237
then
1229-
Warning ("restriction " & To_Mixed (R_Id'Img) &
1230-
" ignored - only fully effective during code generation");
1238+
Warning
1239+
("restriction " & To_Mixed (R_Id'Img)
1240+
& " ignored - only fully effective during code generation");
12311241

12321242
Restriction_Setting (R_Id).Active := False;
12331243
end if;
@@ -1243,20 +1253,23 @@ package body Gnatcheck.Compiler is
12431253
No_Entry_Queue |
12441254
No_Reentrancy
12451255
then
1246-
Warning ("restriction " & To_Mixed (R_Id'Img) &
1247-
" ignored - cannot be checked statically");
1256+
Warning
1257+
("restriction " & To_Mixed (R_Id'Img)
1258+
& " ignored - cannot be checked statically");
12481259

12491260
Restriction_Setting (R_Id).Active := False;
12501261

12511262
elsif R_Id = No_Recursion then
1252-
Warning ("restriction No_Recursion ignored (cannot be checked " &
1253-
"statically), use rule Recursive_Subprograms instead");
1263+
Warning
1264+
("restriction No_Recursion ignored (cannot be checked statically), "
1265+
& "use rule Recursive_Subprograms instead");
12541266

12551267
Restriction_Setting (R_Id).Active := False;
12561268

12571269
elsif R_Id = Max_Asynchronous_Select_Nesting and then R_Val /= 0 then
1258-
Warning ("restriction Max_Asynchronous_Select_Nesting ignored - " &
1259-
"cannot be checked statically if parameter is not 0");
1270+
Warning
1271+
("restriction Max_Asynchronous_Select_Nesting ignored - "
1272+
& "cannot be checked statically if parameter is not 0");
12601273
Restriction_Setting (R_Id).Active := False;
12611274
end if;
12621275
end Process_Restriction_Param;
@@ -1320,8 +1333,9 @@ package body Gnatcheck.Compiler is
13201333

13211334
Style_To_Instance.Insert ([C], Name, Cursor, Success);
13221335
if not Success and then Style_To_Instance (Cursor) /= Name then
1323-
Error ("cannot enable the same style check in different " &
1324-
"rule instances : " & C);
1336+
Error
1337+
("cannot enable the same style check in different rule "
1338+
& "instances: " & C);
13251339
Bad_Rule_Detected := True;
13261340
return;
13271341
end if;
@@ -1395,8 +1409,9 @@ package body Gnatcheck.Compiler is
13951409
if Param (J) in 'e' | 's'
13961410
and then (J = Param'First or else Param (J - 1) not in '.' | '_')
13971411
then
1398-
Error ("Warnings rule cannot have " & Param (J) &
1399-
" parameter, parameter string " & Param & " ignored");
1412+
Error
1413+
("Warnings rule cannot have " & Param (J)
1414+
& " parameter, parameter string " & Param & " ignored");
14001415
Bad_Rule_Detected := True;
14011416

14021417
return;
@@ -1416,8 +1431,9 @@ package body Gnatcheck.Compiler is
14161431

14171432
Warning_To_Instance.Insert (Param (I .. J), Name, Cursor, Success);
14181433
if not Success and then Warning_To_Instance (Cursor) /= Name then
1419-
Error ("cannot enable the same warning in different rule " &
1420-
"instances : " & Param (I .. J));
1434+
Error
1435+
("cannot enable the same warning in different rule instances: "
1436+
& Param (I .. J));
14211437
Bad_Rule_Detected := True;
14221438
return;
14231439
end if;
@@ -1595,8 +1611,8 @@ package body Gnatcheck.Compiler is
15951611

15961612
-- Test if the worker executable exists
15971613
if Worker = null then
1598-
Error ("cannot locate the worker executable: "
1599-
& Base_Name (Worker_Name));
1614+
Error
1615+
("cannot locate the worker executable: " & Base_Name (Worker_Name));
16001616
raise Fatal_Error;
16011617
end if;
16021618

@@ -1718,8 +1734,9 @@ package body Gnatcheck.Compiler is
17181734
end loop;
17191735

17201736
if Worker = null then
1721-
Error ("cannot locate the worker executable: "
1722-
& Base_Name (Worker_Name));
1737+
Error
1738+
("cannot locate the worker executable: "
1739+
& Base_Name (Worker_Name));
17231740
raise Fatal_Error;
17241741
end if;
17251742

lkql_checker/src/gnatcheck-diagnoses.adb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -751,15 +751,16 @@ package body Gnatcheck.Diagnoses is
751751
when E : others =>
752752

753753
Report_EOL;
754-
Report ("cannot successfully copy information " &
755-
"from " & User_Info_File.all);
754+
Report
755+
("cannot successfully copy information from " & User_Info_File.all);
756756

757757
if Is_Open (User_File) then
758758
Close (User_File);
759759
end if;
760760

761-
Error ("cannot copy information from " & User_Info_File.all &
762-
" into report file");
761+
Error
762+
("cannot copy information from " & User_Info_File.all
763+
& " into report file");
763764

764765
Print (Ada.Exceptions.Exception_Information (E));
765766
end Copy_User_Info;
@@ -1718,8 +1719,8 @@ package body Gnatcheck.Diagnoses is
17181719
then
17191720
Limit_Exceeded := True;
17201721
Info
1721-
("maximum diagnoses reached, see the report file for " &
1722-
"full details");
1722+
("maximum diagnoses reached, see the report file for full "
1723+
& "details");
17231724
else
17241725
if Error_Messages_Storage.Element (Position).Justification
17251726
= Null_Unbounded_String

lkql_checker/src/gnatcheck-output.adb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,11 @@ package body Gnatcheck.Output is
278278
end if;
279279

280280
Put_Line
281-
("Copyright (C) " &
282-
Image (Released_At) &
283-
'-' &
284-
Current_Year &
285-
", AdaCore.");
281+
("Copyright (C) "
282+
& Image (Released_At)
283+
& '-'
284+
& Current_Year
285+
& ", AdaCore.");
286286
end Print_Tool_Version;
287287

288288
------------------------

lkql_checker/src/gnatcheck-projects-aggregate.adb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ package body Gnatcheck.Projects.Aggregate is
202202

203203
begin
204204
if Full_Tool_Name = null then
205-
Error ("Cannot locate " & Executable &
206-
" on PATH, possible installation problem");
205+
Error
206+
("Cannot locate " & Executable
207+
& " on PATH, possible installation problem");
207208
raise Fatal_Error;
208209
end if;
209210

@@ -252,8 +253,9 @@ package body Gnatcheck.Projects.Aggregate is
252253

253254
while not Prj_Iterator_Done loop
254255
if Verbose_Mode then
255-
Info ("Processing aggregated project " &
256-
String (Next_Prj_Name));
256+
Info
257+
("Processing aggregated project "
258+
& String (Next_Prj_Name));
257259
end if;
258260

259261
Free (Prj_Args (2));

0 commit comments

Comments
 (0)