-
Notifications
You must be signed in to change notification settings - Fork 13
Add source based coverage for the extension #139
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
Conversation
| return path.relative(workspaceFolder.uri.fsPath, fullPath); | ||
| } | ||
|
|
||
| // If not in a workspace, return the full path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this be affected by model-checking/kani#2681?
| const playbackCommand: string = `${kaniBinaryPath} --coverage -Z line-coverage --harness ${functionName}`; | ||
| // Run this command: cargo kani --coverage -Z source-coverage --harness verify_success | ||
| // to generate the source coverage output | ||
| const playbackCommand: string = `${kaniBinaryPath} --coverage -Z source-coverage --harness ${functionName}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/playbackCommand/coverageCommand
|
Code coverage is currently broken, and this PR should fix it. We need to rebase this and test to see if it still works as expected. @jaisnan just checking if you are still planning to do this, or should we find a new owner? Thanks! |
|
Closing in favor of #145. |
Updates the extension to use source-based coverage instead of line-based coverage. See #139 for screenshots of how it looks. 1. [a2e37a5](a2e37a5) just applies the changes from #139 in a single commit, rebased on top of main. 2. [e2e3a40](e2e3a40) changes the extension to show the "Get coverage info" button automatically. Before, our documentation instructed a user to [go to settings to enable the button](https://github.com/carolynzech/kani-vscode-extension/blob/25489e8ad813f965428608870426f8e7b2ed35c8/docs/user-guide.md?plain=1#L82). I couldn't find the setting to do that, and I figured if I couldn't find it, our users wouldn't be able to either. I also don't think it makes sense to hide it behind a setting. We can print the warning that it's unstable, but the green/red coverage visual is one of the strongest arguments for using the Kani extension instead of the command line, so we should have this feature front and center. 3. [69f376b](69f376b) just removes comments and unused code. 4. [8a99568](8a99568) updates the documentation to reflect the shift from line-based to source-based coverage, and the removal of the toggle option from [e2e3a40](e2e3a40). 5. [05d0246](05d0246) introduces more custom types, so that we use those instead of any types.
Description of changes:
Kani's source coverage changes the output parsing logic and the highlighting components. This PR fixes the broken integration.
Call-outs:
Some screenshots:

Testing:
How is this change tested?
Tested manually
Is this a refactor change?
No
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.