Skip to content

The plugin silently fails on lcov file that has end_of_record in a function name #16

@konnov

Description

@konnov

Hi @rherrmannr!

Thank you for the amazing plugin! I started to use it today, and it really does what I expected from a coverage viewer.

Unfortunately, I've hit a bug on this line:

let absolutePath = getAbsolutePath(file.file);

I've tracked down the problem to lcov-parse. Basically, it returns malformed entries, when the file contains functions or filenames that have end_of_record as part of their name. Surprisingly, a rust library called socket2 has a function like that.

Interestingly, I am not the first one to have this issue with lcov-parse. @thomascjohnson opened a PR with a fix on December 2024. There was no movement since then, so lcov-parse does not seem to be maintained.

Anyhow, I would appreciate, if you could add a fix. Even a simple workaround for the issue with missing file field in getAbsolutePath would make it work for me:

        if (file.file) {
          let absolutePath = getAbsolutePath(file.file);
          if (absolutePath) {
              file.file = absolutePath;
          }
        }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions