jeremiah-c-leary / vhdl-style-guide

Style guide enforcement for VHDL
GNU General Public License v3.0
179 stars 38 forks source link

False positive with "type_501" #1062

Closed bae-pabr closed 6 months ago

bae-pabr commented 7 months ago

Environment vsg 3.18.0

Describe the bug rule "type_501" is triggered, which is I think a false positive.

To Reproduce

  1. create file with content:
    
    library ieee;
    use ieee.std_logic_1164.all;
    use ieee.numeric_std_unsigned.all;

package foo_pkg is

type t_foo_in is record
    start            : std_logic; -- this is line 8
    stop             : std_logic;
end record;

end package;

architecture rtl of bar is

type t_state is (IDLE, START, PWM);

begin

end rtl;


2. run: vsg -f t501.vhdl -ap

**Expected behavior**
`  type_501                  | Error      |          8 | Change "start" to "START"`
rule type_501 should not trigger for line 8, because this is not an enum.
jeremiah-c-leary commented 7 months ago

Morning @bae-pabr ,

I recently made some improvements to the consistent case rules which I believe will address this issue. Could you try using branch issue-551 and see if that resolves type_501 in your case?

Thanks,

--Jeremy

bae-pabr commented 7 months ago

Hi Jeremy,

I tried branch issue-551 and the issue seems to be fixed for me. When i compare both results type 501 no longer triggers for line 8.

Thanks, Patrick

jeremiah-c-leary commented 7 months ago

Evening @bae-pabr ,

That is good news. I am waiting for others to approve the changes on that branch before I merge it to master.

Hopefully it does not take that long.

--Jeremy

jeremiah-c-leary commented 6 months ago

Afternoon @bae-pabr ,

Just wanted to let you know that I will be merging this to master.

Regards,

--Jeremy