Only update match keys already present in the match dictionary
@@ -1388,7 +1388,7 @@ class Linter(metaclass=LinterMeta):
if not match:
persist.debug('No match for regex: {}'.format(self.regex.pattern))
else:
- match_dict.update(match.groupdict())
+ match_dict.update({key: value for key, value in match.groupdict().items() if key in match_dict})
match_dict["match"] = match
# normalize line and col if necessary
