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

Added GutterJsonOutput as a coverage service. #24

Merged
merged 2 commits into from
Sep 21, 2014

Conversation

neonichu
Copy link
Member

This allows seeing the raw gcov output next to your code inside Xcode,
using https://github.com/neonichu/PuncoverPlugin.

This allows seeing the raw gcov output next to your code inside Xcode,
using https://github.com/neonichu/PuncoverPlugin.
filename = coverage_file.source_file_pathname.to_s
filename = filename.sub(Pathname.pwd.to_s, '')[1..-1]

coverage_file.gcov_data.split("\n").each do |line|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to use coverage_file.coverage_data, where coverage_file.coverage_data[32] is the number of hits for line 32, or nil if it's not a line of code, for example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to stick to displaying raw gcov data for the first version, then figuring out which format makes the most sense :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha!

@marklarr
Copy link
Contributor

This is AWESOME!

marklarr added a commit that referenced this pull request Sep 21, 2014
Added GutterJsonOutput as a coverage service.
@marklarr marklarr merged commit 638693e into SlatherOrg:master Sep 21, 2014
@marklarr
Copy link
Contributor

Thanks @neonichu

@neonichu neonichu deleted the gutter-json branch September 21, 2014 20:25
@marklarr
Copy link
Contributor

marklarr commented Mar 4, 2015

we should add something to the README about this, it's a cool feature

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

Successfully merging this pull request may close these issues.

2 participants