Skip to content
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

coverage in json format #389

Open
brunolnetto opened this issue Dec 7, 2022 · 5 comments
Open

coverage in json format #389

brunolnetto opened this issue Dec 7, 2022 · 5 comments

Comments

@brunolnetto
Copy link

Hi,

I am thankful for this repository and its many possibilities. I wrote the command below to improve kcov-habilities.

kcov --report-only --clean \
     --bash-dont-parse-binary-dir \
     --include-pattern=.sh \
     --exclude-pattern=tests \
     --include-path=. \
     ./coverage/ bats ./tests

In words, it generates on the current folder the folder coverage from the evaluation of the current folder itself, except the tests folder. It won't parse the binary directory for other scripts and will not accumulate data from multiple runs.

After the command run as above, I obtained the output available on my repository. During research, I saw some inconsistent information about kcov output. The most relevant, in my opinion, was the output in JSON format.

The command run kcov --version gives the output kcov 38, which means I have 2 versions behind the last version kcov 40. It is my greatest suspicion. What do you think?

@SimonKagstrom
Copy link
Owner

Do you really want --report-only here? The idea with that is to separate coverage collection (with --collect-only) from reporting, which is done with --report-only. Since this is bash, it might not make any difference, but I don't think that was what's intended?

What are the inconsistencies?

There have been bugfixes for later versions, but I'm not sure if it matches your descriptions.

@brunolnetto
Copy link
Author

For now, I want to update kcov to its latest version kcov 40. We will see if it is enough.

@brunolnetto
Copy link
Author

I could not update it manually. Repository says its latesy version is 40. How can I update it to this version?

@SimonKagstrom
Copy link
Owner

There is a docker image, which perhaps is the easiest way. https://hub.docker.com/r/kcov/kcov/

Otherwise, you'll have to build it from source.

@brunolnetto
Copy link
Author

Badge docker build says no longer available. Should I trust it? These badges make kcov not trustworthy. We must work on it. The next question is: how?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants