Hey
I’m trying to have a build system work woth this sort of output:
== lib/blah/store.ex ==
70: LineLength: Line length should not exceed 80 chars (was 90).
71: LineLength: Line length should not exceed 80 chars (was 90).
There are multiple references of named captures around, so I came up with:
"file_regex": "^\\=\\= (?'filename'.*) \\=\\=$",
"line_regex": "^(?'line\\ number'[0-9]+): (?'error\\ message'.*)"
It gets the filename and the line number correctly. But the error message show as == lib/blah/store.ex ==
.
I am pretty sure the capture fields are not named correctly in the docs (Some contain space, sometimes it’s file name
sometimes it’s filename
).
Is there any consistent documentation about capturing the fields in an arbitrary order anywhere?
My initial attempt was without named capture groups:
"file_regex": "^\\=\\= (.*) \\=\\=$",
"line_regex": "^([0-9]+): (.*)"
Exact same result, like if the named capture groups (Described as “fields” in the docs) are not caught.
Thanks!
Doodloo.