Skip to content

Commit

Permalink
Merge branch 'mku/deprecation_message' into 'master'
Browse files Browse the repository at this point in the history
Add deprecation message when gntapp is executed

Closes #126

See merge request eng/ide/libadalang-tools!236
  • Loading branch information
CKMonika committed Sep 10, 2024
2 parents 67decb7 + b1e007d commit 6b41fc8
Show file tree
Hide file tree
Showing 91 changed files with 680 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pp-main.adb
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,19 @@ procedure Pp.Main is

Tool : Actions.Pp_Tool;
Cmd : Utils.Command_Lines.Command_Line
(Pp.Command_Lines.Descriptor'Access);
(Pp.Command_Lines.Descriptor'Access);

begin
-- By default, send errors to stdout
Utils.Err_Out.Output_Enabled := True;

-- Deprecation message to advertise about GNATformat
Utils.Err_Out.Put
("\n\1\n",
"WARNING: GNATpp will be baselined soon. Please switch "
& "to GNATformat, the new Ada code formatter, for future use.");
Utils.Err_Out.Put ("-------\n\n");

-- Override trace settings by parsing the config file
GNATCOLL.Traces.Parse_Config_File;

Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/metric/RB16-011/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Foo (I : in out Integer) is
begin
if I > 0 then
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/CS0037228/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package body Foo is

procedure Create
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Test is
-- Documentation
-- Something
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/CS0038689/ignore_cmd_gpr/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

Units remaining: 4
package Test_1 is
type Foo;
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/CS0039262/test.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------


package test is

procedure P1
Expand Down
12 changes: 12 additions & 0 deletions testsuite/tests/pp/G905-011/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
procedure Gnatpp_Array_Formatting is
type Rec_T is record
Expand All @@ -21,6 +25,10 @@ procedure Gnatpp_Array_Formatting is
begin
null;
end Gnatpp_Array_Formatting;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

with Ada.Text_IO;
procedure Gnatpp_Exdentation is
A_String_1 : constant String := "abc";
Expand All @@ -44,6 +52,10 @@ begin
Integer'Image (An_Integer_3 + An_Integer_4) & ASCII.LF);
end if;
end Gnatpp_Exdentation;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Junk is
begin
Test
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/G913-019/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure TEST is
procedure PROCEDURE_NAME
(PARAM1 : in Integer;
Expand Down
12 changes: 12 additions & 0 deletions testsuite/tests/pp/MB21-028/test.out
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure P is
pragma Warnings (Off);
-- Explain why we turned warnings off.
begin
null;
end P;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure P is
pragma Warnings (Off);

Expand All @@ -12,6 +20,10 @@ procedure P is
begin
null;
end P;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package body Q is

procedure P is
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/N218-043/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Directions is

type Direction_Type_2 is
Expand Down
8 changes: 8 additions & 0 deletions testsuite/tests/pp/N219-016/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Records is

type Uncompact_Type is record
Expand All @@ -19,6 +23,10 @@ package Records is
end record;

end Records;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Records is

type Uncompact_Type is
Expand Down
8 changes: 8 additions & 0 deletions testsuite/tests/pp/N312-029/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Sample_Formatting is

begin
Expand Down Expand Up @@ -34,6 +38,10 @@ begin
end My_Begin_Block;

end Sample_Formatting;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Sample_Formatting is

begin
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/N428-004/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Ors is
begin
Rcc.Ahb1enr :=
Expand Down
8 changes: 8 additions & 0 deletions testsuite/tests/pp/N812-011/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package P with
Pure
is
Expand All @@ -12,6 +16,10 @@ is
Pre => A > 0, Post => B = A'Old;

end P;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Q is

type T is new Integer;
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/N827-012/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

with Ada.Characters.Latin_1;

package P is
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/O723-016/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

with Toto, Titi;

function Foo (Profondeur : in Natural; B : Natural) return Float is
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/OA07-042/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Align_Test is
Index : Integer;
Number_Test : Integer;
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/P318-034/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

-- Testing pretty printing of enums with inline documentation
procedure test_main is

Expand Down
8 changes: 8 additions & 0 deletions testsuite/tests/pp/P408-012/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Pretty is

package Ip is
Expand Down Expand Up @@ -46,6 +50,10 @@ begin
null;

end Pretty;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Pretty is

package Ip is
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/P523-009/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

pragma Ada_95;
pragma Warnings (Off);
pragma Source_File_Name (ada_main, Spec_File_Name => "b__test069.2.ads");
Expand Down
8 changes: 8 additions & 0 deletions testsuite/tests/pp/P817-005/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Example_With_Comments is

type Log_Type is
Expand All @@ -17,6 +21,10 @@ package Example_With_Comments is
Pre => progname'Length <= 64 and filename'Length <= 4_096;

end Example_With_Comments;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Example_With_Comments is -- end of line

type Log_Type is
Expand Down
8 changes: 8 additions & 0 deletions testsuite/tests/pp/Q724-015/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Csc_Channel.Version_Handling is
type T_Version_Handling is limited interface;
type T_Version_Handling_Class_Access is access all T_Version_Handling'Class;
Expand All @@ -8,6 +12,10 @@ package Csc_Channel.Version_Handling is
P1 : out Lang.Primitifs.T_Uint;
P2 : out Lang.Primitifs.T_Uint) is abstract;
end Csc_Channel.Version_Handling;

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Csc_Channel.Version_Handling is
type T_Version_Handling is limited interface;
type T_Version_Handling_Class_Access is access all T_Version_Handling'Class;
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/QA14-008/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Left_Hand_Side is
begin
Some_Array (I) := @ + 1;
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/QA17-028/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

WITH ibusiness_unit.synthetic_target_manager;

PACKAGE BODY pp_reproducer IS
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/QC06-022/P718-006/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Gnatpp_Playground
is

Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/QC06-022/P718-008/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Compact_Array_Type_Declaration
is

Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/QC06-022/P718-010/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Preserve_Existing_Continuation_Lines
is
type Array_Type is
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/QC06-022/P718-011/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Named_Aggregate_Affectation
is

Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/QC06-022/P718-012/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Split_Lines_Before_Vertical_Bars
is

Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/QC06-022/P718-013/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

procedure Blank_Lines_Insertion
is

Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/R713-024/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package Spark_Mode with
SPARK_Mode
is
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/pp/R813-004/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

package body P is

function F return T is
Expand Down
12 changes: 12 additions & 0 deletions testsuite/tests/pp/RB02-007/test.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@

WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------


WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------


WARNING: GNATpp will be baselined soon. Please switch to GNATformat, the new Ada code formatter, for future use.
-------

out
out.sep
out.no-sep
Expand Down
Loading

0 comments on commit 6b41fc8

Please sign in to comment.