Skip to content
Snippets Groups Projects
Commit 574e1407 authored by Štěpán Balážik's avatar Štěpán Balážik
Browse files

rplint: fix matchpart exception handling

parent 68ea0d8d
No related merge requests found
......@@ -279,13 +279,15 @@ def range_shadowing_match_rules(test: RplintTest) -> List[RplintFail]:
for e1, e2 in itertools.combinations(r.stored, 2):
try:
e1.match(e2.message)
# IndexError is here especially because of how we handle empty question section
# in matchpart
except (ValueError, IndexError):
pass
else:
info = "previous entry on line %d" % get_line_number(test.path, e1.node.char)
if e1.match_fields > e2.match_fields:
continue
fails.append(RplintFail(test, e2, info))
# IndexError is here especially because of empty question section in rpls
except (ValueError, IndexError):
pass
return fails
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment