Conversation
|
It seems that the failed tests are unrelated to this cl, but in prettier and clang-format. The ocamlformat vroom tests passed :) |
dbarnett
left a comment
There was a problem hiding this comment.
Thanks! And thanks for bearing with me on delays getting it reviewed!
| let l:fname = expand('%:p') | ||
| if !empty(l:fname) | ||
| let l:cmd += ['--name', l:fname] | ||
| let l:fname_pattern = '"' . escape(l:fname, '\') . '"' |
There was a problem hiding this comment.
Consider defining this closer to the usage. Currently it looks really fishy doing all this escaping and concatenation without any hints what it's used for until much further down.
| let l:matchidx = 1 | ||
| while 1 | ||
| let l:tokens = matchlist(v:exception, | ||
| \ '\vFile ' . l:fname_pattern . ', line (\d+), characters (\d+)-\d+:\n(.*)\n', 0, l:matchidx) |
There was a problem hiding this comment.
Instead of the double indirection matching the output using (1) a pattern built from (2) a dynamic variable, could you just do a looser match for anything that looks like "filename or " and skip any that don't match? This seems like it could be brittle if e.g. paths may be absolute/relative, or have any trivial extra characters like "./".
Signed-off-by: Ari Archer <truncateddinosour@gmail.com>
No description provided.