forked from jeremiah-c-leary/vhdl-style-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrule_018.py
More file actions
36 lines (25 loc) · 750 Bytes
/
rule_018.py
File metadata and controls
36 lines (25 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
from vsg import token
from vsg.rules import move_token_left_to_next_non_whitespace_token as Rule
lTokens = []
lTokens.append(token.variable_declaration.assignment_operator)
class rule_018(Rule):
"""
This rule checks the **:=** is on the same line as the **variable** keyword.
**Violation**
.. code-block:: vhdl
variable size : integer
:= 1;
variable width : integer
:= 32;
**Fix**
.. code-block:: vhdl
variable size : integer :=
1;
variable width : integer :=
32;
"""
def __init__(self):
super().__init__(lTokens)
self.bRemoveTrailingWhitespace = False
self.solution = "Move := operator"