Add support for syntax error with inconsistent tabs and spaces

This commit is contained in:
Sebastian Serth
2020-11-14 00:19:09 +01:00
parent 82169b3afc
commit afe0fc2255

View File

@ -75,7 +75,7 @@ de:
example: EOL while scanning string literal (<unknown>, line 1)
name: Syntax-Fehler
regex: |
(?<what>invalid syntax|EOL while scanning string literal|EOF while scanning triple-quoted string literal|cannot assign to|expected an indented block|Missing parentheses in call to|closing parenthesis|expression cannot contain assignment, perhaps you meant|f-string expression part cannot include a backslash|f-string:|invalid character in identifier|invalid decimal literal|trailing comma not allowed without surrounding parentheses|unexpected EOF while parsing|unexpected character after line continuation character|unexpected indent|unindent does not match any outer indentation level|unmatched) ?(?<what_exactly>function call|literal|operator|set display|empty expression not allowed|single|unmatched)? ?(?:'(?<actual>[^'"]*)'\.*)? ?(?:(?<explanation>Did you mean|does not match opening parenthesis|is not allowed)(?: ')?)?(?:(?<suggestion>.*)(?:\?|'|"))? ?\((?<context>.*), line (?<line>\d*)\).*
(?<what>invalid syntax|EOL while scanning string literal|EOF while scanning triple-quoted string literal|cannot assign to|expected an indented block|Missing parentheses in call to|closing parenthesis|expression cannot contain assignment, perhaps you meant|f-string expression part cannot include a backslash|f-string:|invalid character in identifier|invalid decimal literal|trailing comma not allowed without surrounding parentheses|unexpected EOF while parsing|unexpected character after line continuation character|unexpected indent|unindent does not match any outer indentation level|unmatched|inconsistent use of tabs and spaces in indentation) ?(?<what_exactly>function call|literal|operator|set display|empty expression not allowed|single|unmatched)? ?(?:'(?<actual>[^'"]*)'\.*)? ?(?:(?<explanation>Did you mean|does not match opening parenthesis|is not allowed)(?: ')?)?(?:(?<suggestion>.*)(?:\?|'|"))? ?\((?<context>.*), line (?<line>\d*)\).*
replacement: "%{what}%{what_exactly}%{actual}%{explanation}%{suggestion}" # unused: context, line
log_missing: true
what:
@ -97,6 +97,7 @@ de:
unexpected indent: Ungültige Einrückung
unindent does not match any outer indentation level: Die Einrückung passt nicht zu einem vorherigen Teil
unmatched: 'Die folgende Klammer scheint zu viel zu sein: '
inconsistent use of tabs and spaces in indentation: Gemischte Einrückung mit Leerzeichen und Tabs
what_exactly:
# must start with a space character
function call: ' eine Funktion'