Skip to content

--fix causes ); or ) is to be appended to comment instead of code with last_close_paren: remove_new_line #1530

@lois-bosson-enclustra

Description

@lois-bosson-enclustra

Hello,
First of all, thanks a lot for the great work on VSG!
I've encountered an unexpected behavior which structurally breaks code when using --fix in the following situation:

Environment
OS: Windows 11
VHDL Style Guide (VSG) version: 3.35.0
Shell: Git Bash

Describe the bug
Using the following rules.yaml file:

rule:
    procedure_013:
        last_close_paren: remove_new_line

and the following package.vhd:

package pkg is

  procedure proc (
    arg : natural -- Here:
  );

end package pkg;

package body pkg is

  procedure proc (
    arg : natural -- And here:
  ) is

  begin

    null;

  end procedure proc;

end package body pkg;

Running the command:
$vsg -f package.vhd -c rules.yaml --fix

Moves both ); and ) is to the end of the previous line, that is in the comment block, yielding:

package pkg is

  procedure proc (
    arg : natural -- Here:);

end package pkg;

package body pkg is

  procedure proc (
    arg : natural -- And here:) is

  begin

    null;

  end procedure proc;

end package body pkg;

Expected behavior
The closing parentheses should be moved to the end of the "code portion" of the line, and not in the comment:

package pkg is

  procedure proc (
    arg : natural); -- Here:

end package pkg;

package body pkg is

  procedure proc (
    arg : natural) is -- And here:

  begin

    null;

  end procedure proc;

end package body pkg;

Let me know if you can reproduce it or if you need anything else!

Best regards,

Loïs

Metadata

Metadata

Assignees

Labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions