Skip to content

Commit 13791cc

Browse files
lcd047Kuniwak
authored andcommitted
Fix typo in policy rule name (#200)
The name of the policy rule "ProhibitImplicitScopeBuiltinVariable" is actually implemented as "ProhibitImplicitScopeBuitlinVariable" ("t" and "l" in Builtin are swapped).
1 parent dfb8d3b commit 13791cc

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

test/integration/vint/linting/policy/test_prohibit_implicit_scope_builtin_variable.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from vint.linting.level import Level
55
from vint.linting.policy.prohibit_implicit_scope_builtin_variable import (
6-
ProhibitImplicitScopeBuitlinVariable,
6+
ProhibitImplicitScopeBuiltinVariable,
77
)
88

99
PATH_VALID_VIM_SCRIPT = get_fixture_path(
@@ -12,15 +12,15 @@
1212
'prohibit_implicit_scope_builtin_variable_invalid.vim')
1313

1414

15-
class TestProhibitImplicitScopeBuitlinVariable(PolicyAssertion, unittest.TestCase):
15+
class TestProhibitImplicitScopeBuiltinVariable(PolicyAssertion, unittest.TestCase):
1616
def test_get_violation_if_found_when_file_is_valid(self):
1717
self.assertFoundNoViolations(PATH_VALID_VIM_SCRIPT,
18-
ProhibitImplicitScopeBuitlinVariable)
18+
ProhibitImplicitScopeBuiltinVariable)
1919

2020

2121
def create_violation(self, line, column):
2222
return {
23-
'name': 'ProhibitImplicitScopeBuitlinVariable',
23+
'name': 'ProhibitImplicitScopeBuiltinVariable',
2424
'level': Level.WARNING,
2525
'position': {
2626
'line': line,
@@ -37,7 +37,7 @@ def test_get_violation_if_found_when_file_is_invalid(self):
3737
]
3838

3939
self.assertFoundViolationsEqual(PATH_INVALID_VIM_SCRIPT,
40-
ProhibitImplicitScopeBuitlinVariable,
40+
ProhibitImplicitScopeBuiltinVariable,
4141
expected_violations)
4242

4343
if __name__ == '__main__':

vint/linting/policy/prohibit_implicit_scope_builtin_variable.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010

1111
@register_policy
12-
class ProhibitImplicitScopeBuitlinVariable(AbstractPolicy):
12+
class ProhibitImplicitScopeBuiltinVariable(AbstractPolicy):
1313
def __init__(self):
14-
super(ProhibitImplicitScopeBuitlinVariable, self).__init__()
14+
super(ProhibitImplicitScopeBuiltinVariable, self).__init__()
1515
self.reference = ':help local-variable'
1616
self.level = Level.WARNING
1717

@@ -21,8 +21,8 @@ def listen_node_types(self):
2121

2222

2323
def is_valid(self, identifier, lint_context):
24-
""" Implicit scope buitlin variables are prohibited.
25-
Because it will make unexpected variable name conflict between buitlin
24+
""" Implicit scope builtin variables are prohibited.
25+
Because it will make unexpected variable name conflict between builtin
2626
and imlicit global/function local. For example:
2727
2828
" This variable is not global variable but builtin variable.

0 commit comments

Comments
 (0)