Skip to content

Commit 7a56fbb

Browse files
committed
csparser: recognize text representation produced by cshtml
... in case someone pastes the text directly from a web browser. Without this patch, the parser did not like the [def #NNNN] links.
1 parent 0e68568 commit 7a56fbb

File tree

5 files changed

+867
-1
lines changed

5 files changed

+867
-1
lines changed

src/csparser.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class ErrFileLexer {
152152
RE("^(#)(.*)$");
153153

154154
const RE reChecker_ =
155-
RE("^Error: *(" RE_CHECKER_NAME ")( *\\([^)]+\\))? *:$");
155+
RE("^Error: *(" RE_CHECKER_NAME ")( *\\([^)]+\\))? *:(?: \\[#def[0-9]+\\])?$");
156156

157157
const RE reEvent_ =
158158
RE(/* location */ "^([^:]+)(?::([0-9]+|<unknown>))?(?::([0-9]+))?"

tests/csgrep/75-coverity-from-cshtml-args.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)