Giter Club home page Giter Club logo

Comments (8)

axw avatar axw commented on August 20, 2024

@arvenil do you mean the coverage format of "go test"? If you want that format, why not just use "go test -cover ..." directly?

gocov predates "go test -cover", hence a different format; it's now just a wrapper around "go test -cover". Changing the JSON format would break integration with gocov-related tools (goveralls, gocov-xml, etc.)

from gocov.

axw avatar axw commented on August 20, 2024

Haven't heard back for a few days, so closing this for now. I don't think there's a reason to use gocov over the standard coverage testing except if you want to use the gocov-related tools.

from gocov.

arvenil avatar arvenil commented on August 20, 2024

@axw the problem is that you can't do coverage of multiple packages with standard tools (https://code.google.com/archive/p/go/issues/6909)... gocov solves that but then it doesn't produce standard go format. When it comes to implementation I was actually thinking about gocov generating json like it does now (so no changes to this part) and then adding something like gocov-standard (like go-html) that will convert it back to standard go test format.
On one hand it sounds silly to go back and forth with conversion, on the other hand it doesn't brake anything. The only thing I'm wondering if there are any limitations that would prevent converting json format back to go test -coverprofile like some limitation of the format.

p.s. And yes, I know that there are "scripts" and "tools" that do that but I would like to have one tool for generating coverage report so it's more predictable (btw. pretty awesome library:))

(sorry for delayed answer, I'm having a lot of open questions in all repos :D)

from gocov.

axw avatar axw commented on August 20, 2024

@arvenil I see, thanks for the explanation.

I don't have a need for this, but if you would like to work on it then I'll be happy to review it.

from gocov.

arvenil avatar arvenil commented on August 20, 2024

Ok, let's close the issue for now. When I will have some time I will try to write such library :)

from gocov.

axw avatar axw commented on August 20, 2024

Ok, let's close the issue for now. When I will have some time I will try to write such library :)

No problem. I'll leave this open, in case someone else feels a need for it too.

from gocov.

arvenil avatar arvenil commented on August 20, 2024

goveralls doesn't support anymore gocov
mattn/goveralls#64
so now I see even stronger need for such tool :)

from gocov.

TheRaven avatar TheRaven commented on August 20, 2024

This could be useful for us as well. We are trying to use CodeClimate and they don't support the json output.

from gocov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.