From fd4f8f60e8737734a2a17ac92fac45ea74e2f34d Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 7 Mar 2021 20:04:52 -0600 Subject: [PATCH] Updates for issue #499 Updating tests and changes in rule concurrent_009. Updating concurrent_009 to fix crashing error. --- vsg/rules/concurrent/rule_009.py | 3 ++- vsg/rules/multiline_alignment_between_tokens.py | 9 ++++++--- ...xtract_violation_dictionary_w_all_phases_enabled.json | 6 +++--- .../styles/indent_only/graphicsaccelerator/Debouncer.vhd | 4 ++-- .../styles/indent_only/graphicsaccelerator/Pointer.vhd | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/vsg/rules/concurrent/rule_009.py b/vsg/rules/concurrent/rule_009.py index f0d31d9f..4fa84294 100644 --- a/vsg/rules/concurrent/rule_009.py +++ b/vsg/rules/concurrent/rule_009.py @@ -31,7 +31,8 @@ class rule_009(rule.Rule): def __init__(self): rule.Rule.__init__(self, 'concurrent', '009') - self.phase = 4 + self.phase = 5 + self.subphase = 2 self.lTokenPairs = lTokenPairs self.align_left = 'no' self.configuration.append('align_left') diff --git a/vsg/rules/multiline_alignment_between_tokens.py b/vsg/rules/multiline_alignment_between_tokens.py index 427ccd3a..6c885ccf 100644 --- a/vsg/rules/multiline_alignment_between_tokens.py +++ b/vsg/rules/multiline_alignment_between_tokens.py @@ -450,10 +450,13 @@ def _analyze_align_paren_no_align_left_no(iFirstLine, iLastLine, lParens, dActua def _starts_with_paren(lTokens): - iToken = utils.find_next_non_whitespace_token(1, lTokens) - if isinstance(lTokens[iToken], parser.open_parenthesis): - return True + try: + if isinstance(lTokens[iToken], parser.open_parenthesis): + return True + except IndexError: + if isinstance(lTokens[0], parser.open_parenthesis): + return True return False diff --git a/vsg/tests/rule_list/extract_violation_dictionary_w_all_phases_enabled.json b/vsg/tests/rule_list/extract_violation_dictionary_w_all_phases_enabled.json index 06aad70b..7812e9e6 100644 --- a/vsg/tests/rule_list/extract_violation_dictionary_w_all_phases_enabled.json +++ b/vsg/tests/rule_list/extract_violation_dictionary_w_all_phases_enabled.json @@ -2898,17 +2898,17 @@ { "rule": "process_020", "linenumber": 413, - "solution": "Adjust indent to column 67" + "solution": "Adjust indent to column 33" }, { "rule": "process_020", "linenumber": 414, - "solution": "Adjust indent to column 67" + "solution": "Adjust indent to column 33" }, { "rule": "process_020", "linenumber": 492, - "solution": "Adjust indent to column 63" + "solution": "Adjust indent to column 31" }, { "rule": "process_022", diff --git a/vsg/tests/styles/indent_only/graphicsaccelerator/Debouncer.vhd b/vsg/tests/styles/indent_only/graphicsaccelerator/Debouncer.vhd index 6eb14028..13a4cf96 100644 --- a/vsg/tests/styles/indent_only/graphicsaccelerator/Debouncer.vhd +++ b/vsg/tests/styles/indent_only/graphicsaccelerator/Debouncer.vhd @@ -13,8 +13,8 @@ architecture Behavioral of Debouncer is signal nextHistory : STD_LOGIC := '0'; begin nCounter <= x"FFFFFF" when Counter=x"FFFFFF" and Button='1' else - x"000000" when Counter=x"000000" and Button='0' else - Counter+1 when Button='1' else Counter-1; + x"000000" when Counter=x"000000" and Button='0' else + Counter+1 when Button='1' else Counter-1; nextHistory <= '0' when Counter=x"000000" else '1'; nButtonHistory <= nextHistory & ButtonHistory(1); Dout <= '1' when ButtonHistory="01" else '0'; diff --git a/vsg/tests/styles/indent_only/graphicsaccelerator/Pointer.vhd b/vsg/tests/styles/indent_only/graphicsaccelerator/Pointer.vhd index 8214e719..b06da539 100644 --- a/vsg/tests/styles/indent_only/graphicsaccelerator/Pointer.vhd +++ b/vsg/tests/styles/indent_only/graphicsaccelerator/Pointer.vhd @@ -22,7 +22,7 @@ architecture Behavioral of Pointer is signal rY : STD_LOGIC_VECTOR (8 downto 0) := initY; begin Here <= '1' when syncX(9 downto 3)=rX(9 downto 3) and - syncY(8 downto 3)=rY(8 downto 3) else '0'; + syncY(8 downto 3)=rY(8 downto 3) else '0'; X <= rX; Y <= rY; process (Clk) begin