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

Support a format compatible with codeclimate #119

Closed
blatyo opened this issue Nov 4, 2017 · 7 comments
Closed

Support a format compatible with codeclimate #119

blatyo opened this issue Nov 4, 2017 · 7 comments

Comments

@blatyo
Copy link

blatyo commented Nov 4, 2017

I'm interested in pushing code coverage information to code climate, but the format of the output needs to be one of the ones they currently support. Would you be open to accepting a new output format for code climate?

I'm happy to do the work.

Thanks!

@ale7714
Copy link

ale7714 commented Dec 18, 2017

👋 @blatyo, it's Ale from Code Climate. We have a new test-reporter that makes it easier to add support for new language formatters when the output given by the coverage tool is in a format we can parse (JSON, XML).

Unfortunately, I'm not an elixir expert. Do you think it would be possible to update excoveralls to output a JSON file with the coverage details instead of HTML? Having that would allow us to add parser on the test-reporter and have support for Elixir. I would be happy to help on the test-reporter side.

Thanks!

@blatyo
Copy link
Author

blatyo commented Dec 19, 2017

@ale7714 That's already supported with the --json flag. Here's the test which shows an example of the output for one file:

https://github.com/parroty/excoveralls/blob/master/test/json_test.exs#L48

It's basically:

{
  "source_files": [
    {
      "name": "foo/bar.ex", // name of file
      "source": "defmodule X\nend", // source of file
      "coverage": [0, 1] // counts of coverage per line, where line is the index of the array
    },
    // other files
  ]
}

If you can support that, there's basically nothing left to do.

@ale7714
Copy link

ale7714 commented Dec 19, 2017

@blatyo great news! Thanks for pointing this out. Do you have a real example of the output of coverage for an elixir project? That would be helpful when work on adding the parser on our test-reporter.
If you don’t feel confortable sharing that information on a public GitHub issue, you could send it to my email alexandra@codeclimate.com. Thanks!

@mikemorris
Copy link
Contributor

Does codeclimate/test-reporter#278 solve this issue? I would think that anything else actionable on this ticket could be covered by #104

@blatyo
Copy link
Author

blatyo commented Apr 25, 2018

Yep, this is solved

@amaisano
Copy link

Is #104 solved then? This only seems to address compatibility with codeclimate.

@yordis
Copy link

yordis commented Aug 3, 2019

@blatyo do you have any open source project with CodeClimate setup?

@ale7714 would be amazing if CodeClimate adds some official documentation about this as well.

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

5 participants