Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-fix adds space at the wrong place for style check #145

Open
zertovitch opened this issue Dec 18, 2022 · 1 comment
Open

Auto-fix adds space at the wrong place for style check #145

zertovitch opened this issue Dec 18, 2022 · 1 comment
Assignees
Labels

Comments

@zertovitch
Copy link

zertovitch commented Dec 18, 2022

Hereafter is a reproducer for the issue in title. A consequence is that it ruins the indentation, which can be annoying if auto-fix is applied on many cases at a time (via "Fix all simple style errors").

wrenched.adb:

with Ada.Text_IO;

procedure Wrenched is
   use Ada.Text_IO;
begin
   put_line("oh");
   --
   --  Apply the style fix to the following style errors:
   --
   --  main.adb:6:3: (style) bad casing of "Put_Line" declared at a-textio.ads:509
   --  main.adb:6:11: (style) space required
   --
   --  Result is ` Put_Line("oh");` instead of `Put_Line ("oh");`
   --
end Wrenched;

wrenched.gpr:

project Wrenched is

   for Object_Dir use "obj";
   for Main use ("wrenched.adb");
   for Create_Missing_Dirs use "True";

   package Compiler is
      for Switches ("ada") use ("-gnatytr");
   end Compiler;

end Wrenched;

@AnthonyLeonardoGracio
Copy link
Collaborator

Hello @zertovitch,

indeed, we can reproduce. Thanks for the report.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants