Skip to content

Commit

Permalink
README: Document how to integrate with vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKagstrom committed Jul 9, 2024
1 parent 1d04904 commit bf2c594
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ kcov --merge /tmp/merged-output /tmp/kcov-output1 /tmp/kcov-output2
kcov --merge /tmp/merged-output /tmp/kcov-output* # With a wildcard
```

Use from continuous integration systems
---------------------------------------
Integration with other systems
------------------------------
kcov is easy to integrate with [travis-ci](http://travis-ci.org) together with
[coveralls.io](http://coveralls.io) or [codecov.io](http://codecov.io). It can also
be used from Jenkins, [SonarQube](http://sonarqube.org) and [GitLab CI](http://gitlab.com).
Refer to

* [vscode](doc/vscode.md) for details about vscode + coverage gutters
* [coveralls](doc/coveralls.md) for details about travis-ci + coveralls, or
* [codecov](doc/codecov.md) for details about travis-ci + codecov
* [jenkins](doc/jenkins.md) for details about how to integrate in Jenkins
Expand Down
17 changes: 17 additions & 0 deletions doc/vscode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Integration with vscode
-----------------------
It's easy to produce output for parsing with the [coverage gutters](https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters)
extension to vscode. The `--cobertura-only` option is well-suited for this, which only outputs a
`cov.xml` file and the coverage database in the output directory. Coverage information can then
be directly shown in the "gutter" beside the editor, and is automatically updated by the
extension when the coverage changes.

To produce this output, just run

```
kcov --cobertura-only [other options] /path/to/your/folder/.vscode /path/to/the/binary
```

The coverage gutters extension looks for `cov.xml` files in the workspace, but for performance
reasons, it's good to configure it to only look where the kcov output is (`.vscode`) in this
example.

0 comments on commit bf2c594

Please sign in to comment.