@@ -541,13 +541,15 @@ package body Gnatcheck.Diagnoses is
541541
542542 function Auxiliary_List_File_Name (S : String) return String is
543543 Prj_Out_File : constant String :=
544- (if Text_Report_ON then Base_Name (Get_Report_File_Name)
544+ (if Text_Report_ON
545+ then Base_Name (Get_Report_File_Name)
545546 else Base_Name (Get_XML_Report_File_Name));
546547 Prj_Out_First : constant Natural := Prj_Out_File'First;
547548 Prj_Out_Last : constant Natural := Prj_Out_File'Last;
548549 Prj_Out_Dot : Natural := Index (Prj_Out_File, " ." , Backward);
549550 Prj_Out_Suffix : constant String :=
550- (if Prj_Out_Dot = 0 then " "
551+ (if Prj_Out_Dot = 0
552+ then " "
551553 else Prj_Out_File (Prj_Out_Dot .. Prj_Out_Last));
552554
553555 Suff_Start : Natural;
@@ -839,7 +841,8 @@ package body Gnatcheck.Diagnoses is
839841 if Gnatcheck_Prj.Is_Specified then
840842 XML_Report
841843 (" project="" "
842- & (if Arg.Aggregated_Project then Get_Aggregated_Project
844+ & (if Arg.Aggregated_Project
845+ then Get_Aggregated_Project
843846 else Gnatcheck_Prj.Source_Prj)
844847 & " "" >" );
845848 else
@@ -1261,7 +1264,8 @@ package body Gnatcheck.Diagnoses is
12611264
12621265 Append
12631266 (Res,
1264- (if Rule in Warnings_Id | Style_Checks_Id then El
1267+ (if Rule in Warnings_Id | Style_Checks_Id
1268+ then El
12651269 else GNAT.Case_Util.To_Mixed (El)));
12661270
12671271 Count := Count + 1 ;
@@ -2060,7 +2064,8 @@ package body Gnatcheck.Diagnoses is
20602064 declare
20612065 Sep_Idx : constant Natural := Index (Param, " =" );
20622066 Restriction_Name : constant String :=
2063- (if Sep_Idx = 0 then Param
2067+ (if Sep_Idx = 0
2068+ then Param
20642069 else Param (Param'First .. Sep_Idx - 1 ));
20652070 begin
20662071 if Is_Restriction_Active (Restriction_Name) then
@@ -2137,7 +2142,7 @@ package body Gnatcheck.Diagnoses is
21372142 Exempted_Name => To_Unbounded_String (Exempted_Name),
21382143 Detected => 0 ));
21392144
2140- -- Else, some actuals parameters has been provided
2145+ -- Else, some actuals parameters has been provided
21412146
21422147 else
21432148 -- Check that the object is not exempted with the same params
@@ -2301,7 +2306,8 @@ package body Gnatcheck.Diagnoses is
23012306 .To_String;
23022307
23032308 Just : constant String :=
2304- (if Matches (4 ) = No_Match then " "
2309+ (if Matches (4 ) = No_Match
2310+ then " "
23052311 else
23062312 To_XString (Text (Matches (4 ).First .. Matches (4 ).Last))
23072313 .Trim
@@ -2342,8 +2348,10 @@ package body Gnatcheck.Diagnoses is
23422348 end ;
23432349 else
23442350 Process_Exempt_Action
2345- (((if State = " on" then Exempt_Off
2346- elsif State = " off" then Exempt_On
2351+ (((if State = " on"
2352+ then Exempt_Off
2353+ elsif State = " off"
2354+ then Exempt_On
23472355 else raise Constraint_Error with " should not happen" ),
23482356 To_Unbounded_String (Rule),
23492357 Params => <>,
@@ -2503,7 +2511,8 @@ package body Gnatcheck.Diagnoses is
25032511 Diag_Column : constant Positive := Positive (Diag.Sloc.Column);
25042512 SF : constant SF_Id := Diag.SF;
25052513 R_Name : constant String :=
2506- (if Diag.Diagnosis_Kind = Rule_Violation then Rule_Name (Diag.Rule)
2514+ (if Diag.Diagnosis_Kind = Rule_Violation
2515+ then Rule_Name (Diag.Rule)
25072516 else " " );
25082517 I_Name : constant String :=
25092518 (if Diag.Instance /= null and then Diag.Instance.Is_Alias
@@ -2882,7 +2891,8 @@ package body Gnatcheck.Diagnoses is
28822891 use Ada.Directories;
28832892 File_Name : constant Unbounded_String :=
28842893 To_Unbounded_String
2885- (if Arg.Full_Source_Locations.Get then Full_File_Name
2894+ (if Arg.Full_Source_Locations.Get
2895+ then Full_File_Name
28862896 else Simple_Name (Full_File_Name));
28872897 Tmp : Diag_Message :=
28882898 (Text => To_Unbounded_String (Message),
@@ -2992,10 +3002,14 @@ package body Gnatcheck.Diagnoses is
29923002 M_Start : Natural := Message'First;
29933003 begin
29943004 XML_Report_No_EOL
2995- ((if Diag.Diagnosis_Kind = Exemption_Warning then " <exemption-problem"
2996- elsif Diag.Diagnosis_Kind = Compiler_Error then " <compiler-error"
2997- elsif Diag.Diagnosis_Kind = Internal_Error then " <internal-error"
2998- elsif Exempted then " <exempted-violation"
3005+ ((if Diag.Diagnosis_Kind = Exemption_Warning
3006+ then " <exemption-problem"
3007+ elsif Diag.Diagnosis_Kind = Compiler_Error
3008+ then " <compiler-error"
3009+ elsif Diag.Diagnosis_Kind = Internal_Error
3010+ then " <internal-error"
3011+ elsif Exempted
3012+ then " <exempted-violation"
29993013 else " <violation" ),
30003014 Indent_Level => Indentation);
30013015
@@ -3047,9 +3061,12 @@ package body Gnatcheck.Diagnoses is
30473061 XML_Report
30483062 ((if Diag.Diagnosis_Kind = Exemption_Warning
30493063 then " </exemption-problem>"
3050- elsif Diag.Diagnosis_Kind = Compiler_Error then " </compiler-error>"
3051- elsif Diag.Diagnosis_Kind = Internal_Error then " </internal-error>"
3052- elsif Exempted then " </exempted-violation>"
3064+ elsif Diag.Diagnosis_Kind = Compiler_Error
3065+ then " </compiler-error>"
3066+ elsif Diag.Diagnosis_Kind = Internal_Error
3067+ then " </internal-error>"
3068+ elsif Exempted
3069+ then " </exempted-violation>"
30533070 else " </violation>" ),
30543071 Indent_Level => Indentation);
30553072 end XML_Report_Diagnosis ;
0 commit comments