mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Get the index of the tab, not the line itself
This commit is contained in:
@@ -177,7 +177,7 @@ class ModuleValidator(Validator):
|
|||||||
indent = INDENT_REGEX.search(line)
|
indent = INDENT_REGEX.search(line)
|
||||||
for i in indent.groups():
|
for i in indent.groups():
|
||||||
if '\t' in i:
|
if '\t' in i:
|
||||||
index = line.index(i)
|
index = line.index('\t')
|
||||||
self.errors.append('indentation contains tabs. line %d '
|
self.errors.append('indentation contains tabs. line %d '
|
||||||
'column %d' % (line_no + 1, index))
|
'column %d' % (line_no + 1, index))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user