Closed zertovitch closed 11 months ago
Hello @zertovitch ,
I get
with Ada.Text_IO;
procedure K_Warning is
msg : constant String := "Hello!"; -- <--- Here the auto-fix is applied.
use Ada.Text_IO;
begin
Put_Line (msg);
--
-- Apply autofix for the following:
--
-- k_warning.adb:4:4: warning: "msg" is not modified, could be declared constant
--
end K_Warning;
with your reproducer, which seems correct to me. What is the result you would expect?
Regards,
Perhaps you have tested with Auto indentation (Preferences/Editor/Ada) on "Extended" or "None" ? If I set the Auto indentation on "Simple" (and only then) I get the following:
with Ada.Text_IO;
procedure K_Warning is
msg : constant String := "Hello!"; -- <--- Here the auto-fix is applied.
use Ada.Text_IO;
begin
Put_Line (msg);
--
-- Apply autofix for the following:
--
-- k_warning.adb:4:4: warning: "msg" is not modified, could be declared constant
--
end K_Warning;
Hereafter is a reproducer for the issue in title. When applying the suggested auto-fix, the indentation seems to imitate that of the previous line; at least not that of current line.
k_warning.adb:
k_warning.gpr: