-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gcov support #345
Comments
@Jaakkonen Thanks for the issue! I am unfamiliar with the coverage landscape for C programs but gcov looks to be one popular standard 🤔 but we do not currently support it (as you alluded to above). I believe people have used the expension with gcov by using lcov to convert the coverage?
https://medium.com/@naveen.maltesh/generating-code-coverage-report-using-gnu-gcov-lcov-ee54a4de3f11 Let me know if that helps any in the meantime but we could consider gcov support in the future (or if there is already a javscript / typescript package that can convert gcov -> lcov then that would make this addition even easier)! |
You can generate Note that you may have issues with relative paths depending on how your coverage was generated. You can fix that with
|
Is your feature request related to a problem? Please describe.
Currently it's not possible to see coverage of programs written in C.
Describe the solution you'd like
Add support for formats used by
gcov
(.gcna, .gcno) and llvm profiling (.profdata).Describe alternatives you've considered
https://github.com/JacquesLucke/gcov-viewer but that doesn't have same kind of auto detection and less-obstructing UI that coverage-gutters has.
One option is to use CLI/TUI programs to do this but it's really nice to be able to edit code and see coverage at the same time.
Additional context
Guide for getting coverage with LLVM: https://releases.llvm.org/12.0.1/tools/clang/docs/SourceBasedCodeCoverage.html
Gcov trivial example: https://github.com/shenxianpeng/gcov-example
Ok-ish explanation how gcov works: https://www.tutorialspoint.com/unix_commands/gcov.htm
https://llvm.org/docs/CommandGuide/llvm-profdata.html
The text was updated successfully, but these errors were encountered: