Skip to content

Commit dbb5532

Browse files
author
Killian Perlin
committed
Merge branch 'topic/gnatformat-bump' into 'master'
Reformat sources following gnatformat bump See merge request eng/libadalang/langkit-query-language!551
2 parents 34864ee + 80159bf commit dbb5532

10 files changed

+102
-103
lines changed

lkql_checker/src/gnatcheck-compiler.adb

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ package body Gnatcheck.Compiler is
245245
else
246246
Diag (Diag'First .. Idx - 1)
247247
& Diag (Idx + 9 .. Diag'Last))),
248-
when Style =>
248+
when Style =>
249249
(declare
250250
Idx : constant Natural := Index (Diag, "(style) ");
251251
begin
@@ -254,7 +254,7 @@ package body Gnatcheck.Compiler is
254254
else
255255
Diag (Diag'First .. Idx - 1)
256256
& Diag (Idx + 8 .. Diag'Last))),
257-
when others => Diag);
257+
when others => Diag);
258258

259259
Last_Idx : Natural;
260260
Diag_End : Natural;
@@ -672,7 +672,7 @@ package body Gnatcheck.Compiler is
672672
pragma Assert (False);
673673
return "";
674674

675-
when Warning =>
675+
when Warning =>
676676
if Parameter = "" then
677677
return " [warnings]";
678678
elsif Warning_To_Instance.Contains (Parameter)
@@ -688,7 +688,7 @@ package body Gnatcheck.Compiler is
688688
return " [warnings:" & Parameter & "]";
689689
end if;
690690

691-
when Style =>
691+
when Style =>
692692
if Parameter = "" then
693693
return " [style_checks]";
694694
elsif Style_To_Instance.Contains (Parameter)
@@ -704,7 +704,7 @@ package body Gnatcheck.Compiler is
704704
return " [style_checks:" & Parameter & "]";
705705
end if;
706706

707-
when Restriction =>
707+
when Restriction =>
708708
if Restriction_To_Instance.Contains (Parameter)
709709
and then Restriction_To_Instance (Parameter) /= "restrictions"
710710
then
@@ -714,7 +714,7 @@ package body Gnatcheck.Compiler is
714714
return " [restrictions]";
715715
end if;
716716

717-
when Error =>
717+
when Error =>
718718
return " [errors]";
719719
end case;
720720
end Annotation;
@@ -767,7 +767,7 @@ package body Gnatcheck.Compiler is
767767
for R in Special_Restriction_Setting'Range loop
768768
if Special_Restriction_Setting (R) then
769769
case R is
770-
when No_Dependence =>
770+
when No_Dependence =>
771771
Forbidden_Units_Dictionary.Reset_Iterator;
772772

773773
while not Forbidden_Units_Dictionary.Done loop
@@ -777,7 +777,7 @@ package body Gnatcheck.Compiler is
777777
Add_Line (Forbidden_Units_Dictionary.Next_Entry & ");");
778778
end loop;
779779

780-
when No_Use_Of_Entity =>
780+
when No_Use_Of_Entity =>
781781
Forbidden_Entities_Dictionary.Reset_Iterator;
782782

783783
while not Forbidden_Entities_Dictionary.Done loop
@@ -841,13 +841,13 @@ package body Gnatcheck.Compiler is
841841
pragma Assert (False);
842842
return No_Rule_Id;
843843

844-
when Warning =>
844+
when Warning =>
845845
return Warnings_Id;
846846

847-
when Style =>
847+
when Style =>
848848
return Style_Checks_Id;
849849

850-
when Restriction =>
850+
when Restriction =>
851851
return Restrictions_Id;
852852
end case;
853853
end Get_Rule_Id;
@@ -1085,15 +1085,15 @@ package body Gnatcheck.Compiler is
10851085
for R in Special_Restriction_Setting'Range loop
10861086
if Special_Restriction_Setting (R) then
10871087
case R is
1088-
when No_Dependence =>
1088+
when No_Dependence =>
10891089
Forbidden_Units_Dictionary.Reset_Iterator;
10901090
while not Forbidden_Units_Dictionary.Done loop
10911091
Append_Elem
10921092
("No_Dependence => "
10931093
& Forbidden_Units_Dictionary.Next_Entry);
10941094
end loop;
10951095

1096-
when No_Use_Of_Entity =>
1096+
when No_Use_Of_Entity =>
10971097
Forbidden_Entities_Dictionary.Reset_Iterator;
10981098
while not Forbidden_Entities_Dictionary.Done loop
10991099
Append_Elem
@@ -1302,7 +1302,7 @@ package body Gnatcheck.Compiler is
13021302
-- Special_R_Id /= Not_A_Special_Restriction_Id
13031303

13041304
case Special_R_Id is
1305-
when No_Dependence =>
1305+
when No_Dependence =>
13061306
if not Arg_Present then
13071307
Instance.Error
13081308
("Restrictions rule parameter: "
@@ -1317,7 +1317,7 @@ package body Gnatcheck.Compiler is
13171317
Forbidden_Units_Dictionary.Add_To_Dictionary
13181318
(Trim (Param (Last_Idx .. Param'Last), Both));
13191319

1320-
when No_Use_Of_Entity =>
1320+
when No_Use_Of_Entity =>
13211321
if not Arg_Present then
13221322
Instance.Error
13231323
("Restrictions rule parameter: "
@@ -1332,7 +1332,7 @@ package body Gnatcheck.Compiler is
13321332
Forbidden_Entities_Dictionary.Add_To_Dictionary
13331333
(Trim (Param (Last_Idx .. Param'Last), Both));
13341334

1335-
when No_Specification_Of_Aspect =>
1335+
when No_Specification_Of_Aspect =>
13361336
if not Arg_Present then
13371337
Instance.Error
13381338
("Restrictions rule parameter: "
@@ -1463,13 +1463,13 @@ package body Gnatcheck.Compiler is
14631463
-- -gnatyLxx and -gnatyMxxx are represented respectively by
14641464
-- "L" and "M". Skip all digits directly after the flag.
14651465

1466-
when 'L' | 'M' =>
1466+
when 'L' | 'M' =>
14671467
while I < Param'Last and then Param (I + 1) in '0' .. '9'
14681468
loop
14691469
I := I + 1;
14701470
end loop;
14711471

1472-
when others =>
1472+
when others =>
14731473
null;
14741474
end case;
14751475

@@ -2102,7 +2102,7 @@ package body Gnatcheck.Compiler is
21022102
for R in Special_Restriction_Setting'Range loop
21032103
if Special_Restriction_Setting (R) then
21042104
case R is
2105-
when No_Dependence =>
2105+
when No_Dependence =>
21062106
Forbidden_Units_Dictionary.Reset_Iterator;
21072107

21082108
while not Forbidden_Units_Dictionary.Done loop
@@ -2113,7 +2113,7 @@ package body Gnatcheck.Compiler is
21132113
Indent_Level + 1);
21142114
end loop;
21152115

2116-
when No_Use_Of_Entity =>
2116+
when No_Use_Of_Entity =>
21172117
Forbidden_Entities_Dictionary.Reset_Iterator;
21182118

21192119
while not Forbidden_Entities_Dictionary.Done loop

lkql_checker/src/gnatcheck-diagnoses.adb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ package body Gnatcheck.Diagnoses is
677677
end if;
678678

679679
case Error_Messages_Storage.Element (Position).Diagnosis_Kind is
680-
when Rule_Violation =>
680+
when Rule_Violation =>
681681
if Error_Messages_Storage.Element (Position).Justification
682682
= Null_Unbounded_String
683683
then
@@ -691,10 +691,10 @@ package body Gnatcheck.Diagnoses is
691691
when Exemption_Warning =>
692692
Detected_Exemption_Warning := @ + 1;
693693

694-
when Compiler_Error =>
694+
when Compiler_Error =>
695695
Detected_Compiler_Error := @ + 1;
696696

697-
when Internal_Error =>
697+
when Internal_Error =>
698698
Detected_Internal_Error := @ + 1;
699699
end case;
700700
end Count_Diagnoses;
@@ -779,16 +779,16 @@ package body Gnatcheck.Diagnoses is
779779
begin
780780
for C of S loop
781781
case C is
782-
when '&' =>
782+
when '&' =>
783783
Append (Result, "&amp;");
784784

785-
when '<' =>
785+
when '<' =>
786786
Append (Result, "&lt;");
787787

788-
when '>' =>
788+
when '>' =>
789789
Append (Result, "&gt;");
790790

791-
when '"' =>
791+
when '"' =>
792792
Append (Result, "&quot;");
793793

794794
when ASCII.NUL .. ASCII.US =>
@@ -799,7 +799,7 @@ package body Gnatcheck.Diagnoses is
799799
(Result, "&#" & Img (Img'First + 1 .. Img'Last) & ";");
800800
end;
801801

802-
when others =>
802+
when others =>
803803
Append (Result, C);
804804
end case;
805805
end loop;
@@ -2056,7 +2056,7 @@ package body Gnatcheck.Diagnoses is
20562056
-- Now - processing of the exemption action. If we are here, we are
20572057
-- sure that Rule denotes an existing and enabled rule.
20582058
case Action.Exemption_Control is
2059-
when Exempt_On =>
2059+
when Exempt_On =>
20602060
if Action.Justification = Null_Unbounded_String then
20612061
Action.Justification := To_Unbounded_String ("unjustified");
20622062
end if;
@@ -2204,7 +2204,7 @@ package body Gnatcheck.Diagnoses is
22042204
Params => Action.Params));
22052205
end if;
22062206

2207-
when Exempt_Off =>
2207+
when Exempt_Off =>
22082208
-- If there are no parameters provided, just verify that the name
22092209
-- is exempted, if so close the exemption.
22102210
if not Has_Params then
@@ -3071,12 +3071,12 @@ package body Gnatcheck.Diagnoses is
30713071

30723072
Tag_String : constant String :=
30733073
(case Self.Diagnosis_Kind is
3074-
when Rule_Violation =>
3074+
when Rule_Violation =>
30753075
(if Self.Justification /= Null_Unbounded_String
30763076
then "rule violation (exempted): "
30773077
else "rule violation: "),
30783078
when Exemption_Warning => "warning: ",
3079-
when others => "");
3079+
when others => "");
30803080
begin
30813081
return
30823082
To_String (Self.File)

lkql_checker/src/gnatcheck-json_utilities.adb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ package body Gnatcheck.JSON_Utilities is
8585
Field_Value ((Field_Value'First + 1) .. (Field_Value'Last - 1))
8686
loop
8787
case C is
88-
when ',' =>
88+
when ',' =>
8989
if Tuple_Level = 0 then
9090
Res.Append (Remove_Quotes (To_String (Acc)));
9191
Set_Unbounded_String (Acc, "");
@@ -94,7 +94,7 @@ package body Gnatcheck.JSON_Utilities is
9494
Append (Acc, C);
9595
end if;
9696

97-
when ' ' =>
97+
when ' ' =>
9898
if In_Item then
9999
Append (Acc, C);
100100
end if;

lkql_checker/src/gnatcheck-output.adb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ package body Gnatcheck.Output is
111111
(if Tool_Name then Executable & ": " else "")
112112
& (if Location /= "" then Location & ": " else "")
113113
& (case Tag is
114-
when Info => "info: ",
114+
when Info => "info: ",
115115
when Warning => "warning: ",
116-
when Error => "error: ",
117-
when None => "")
116+
when Error => "error: ",
117+
when None => "")
118118
& Message;
119119
begin
120120
-- Display the message in the standard error

0 commit comments

Comments
 (0)