Multiline Problem Matcher
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
In #319 there was a discussion about the multiline "problem matcher" which was closed even though it was not actually fixed on the problem matcher side, so I think it's time to have this discussion again.
For example, OCaml has the following error log, which is very difficult to catch with current problem matcher.
File "bin/main.ml", line 0, characters 0-0:
type t =
| Foo of string [@ocaml.warn_on_literal_pattern]
| Bar of string
let no_warning = function
| Bar "specific value" -> 0
| _ -> 1
let warning = function
| Foo "specific value" -> 0
| _ -> 1
Warning 52 [fragile-literal-pattern]: Code should not depend on the actual values of
this constructor's arguments. They are only for information
and may change in future versions. (See manual section 13.5)
In such a case, it would be a fairly complex regular expression, but you can catch properly with code like the following, but the current implementation just works line-by-line.
^File\s"(.+)",\sline\s(\d+),\scharacters\s(\d+)-(\d+):\n((.|\n)+?)(Error|Warning)\s*(.*):\s((.|\n(?!File\s))+)$
https://regex101.com/r/gP6PEM/1
This means that it's impossible to matching such logs with such a regular expression.
In other words, we can't deal with issues like #319 on the user's end. Do you have any improvement plans for this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by reviewing the discussion in #319 and the current problem matcher behavior described in this issue, including the OCaml log and regex example; done should mean multiline diagnostics can be matched without breaking existing line-by-line matching.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ci-cd, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100