Bug 1691352 - fix: mozlint/codespell: Improve the --fix display r=linter-reviewers,andi DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D104524
This commit is contained in:
Sylvestre Ledru 2021-02-09 13:45:46 +00:00
parent 383297711f
commit ee69201894

View File

@ -51,7 +51,8 @@ class CodespellProcess(LintProcess):
match = CODESPELL_FORMAT_REGEX.match(line)
abspath, line, typo, correct = match.groups()
except AttributeError:
print("Unable to match regex against output: {}".format(line))
if "FIXED: " not in line:
print("Unable to match regex against output: {}".format(line))
return
# Ignore false positive like aParent (which would be fixed to apparent)