vhdl-style-guide/vsg/rules/if_statement/rule_003.py

35 lines
603 B
Python

# -*- coding: utf-8 -*-
from vsg import parser, token
from vsg.rules.whitespace_between_token_pairs import Rule
lTokens = []
lTokens.append([token.if_statement.if_keyword, parser.open_parenthesis])
class rule_003(Rule):
"""
This rule checks for a single space between the **if** keyword and the (.
|configuring_whitespace_rules_link|
**Violation**
.. code-block:: vhdl
if(a = '1') then
if (a = '1') then
**Fix**
.. code-block:: vhdl
if (a = '1') then
if (a = '1') then
"""
def __init__(self):
super().__init__(lTokens)