google / vim-coverage

Apache License 2.0
101 stars 22 forks source link

Fix gcov list unpacking for raw section containing colons #48

Closed pall-valmundsson closed 2 years ago

pall-valmundsson commented 2 years ago

When parsing lcov output generated by grcov, a Rust code coverage tool, the error Less targets than List items is thrown when parsing FN lines for functions nested within modules as Rust uses :: as a separator in nested hierarchies of modules.

By unpacking the prefix and collecting all other elements into a separate list that is then joined using the same separator the issue is resolved.

google-cla[bot] commented 2 years ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

pall-valmundsson commented 2 years ago

I really wanted to include a test case for this but I couldn't get vroom working on my Fedora system.

I'm also a novice vimscript developer, there might be a cleaner way to do this that I'm not aware of.

dbarnett commented 2 years ago

but I couldn't get vroom working on my Fedora system.

Odd, maybe it'd be worth reporting a bug for that with specific error messages for reference.

Anyway, I'll see if I can patch the changes and check them against tests once you check on the semicolon thing. Or maybe I could even get them running again automatically on the repo…