-
Notifications
You must be signed in to change notification settings - Fork 60
--fix produces invalid syntax for subprograms #1522
Copy link
Copy link
Open
Labels
Description
Environment
VSG version: 3.35.0
OS: Ubuntu 22.04.5 LTS
Describe the bug
When using the --fix option, vsg currently produces invalid VHDL syntax, when fixing function_020 or procedure_014 for nested subprograms. Instead of adding just the designator, <designator>;function; is added.
To Reproduce
Steps to reproduce the behavior:
- get minimal.vhd.txt
- get minimal.yml
- run
vsg -f minimal.vhd -c minimal.yml --fix - See error in "fixed" file
Expected behavior
The optional subprogram designator is added at the end of the subprogram.
original:
function calc_out_function return integer is
function nested_function_function return integer is
begin
return 5;
end function;
begin
return 2 * nested_function_function;
end function;expected:
function calc_out_function return integer is
function nested_function_function return integer is
begin
return 5;
end function nested_function_function;
begin
return 2 * nested_function_function;
end function calc_out_function;actual:
function calc_out_function return integer is
function nested_function_function return integer is
begin
return 5;
end function;
begin
return 2 * nested_function_function;
end function calc_out_function;function;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Projects
Status
No status