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

Refactor to support importing from go #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jinhong-
Copy link

Hi, I did some refactors to allow me to import gcov2lcov to use in my code directly. Not sure if you are keen to merge this back into your repo but here it is :)

Copy link
Owner

@jandelgado jandelgado left a comment

Choose a reason for hiding this comment

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

Thanks @jinhong- , I think this improves the code and adds new use-cases. Please look at my comment, I think we should rename the AbsolutePathResolver

blocks, err := parseCoverage(in, pathResolverFunc)
if err != nil {
return err
}
return writeLcov(blocks, out)
}

func AbsolutePathResolver(name string) string {
return name
func AbsolutePathResolver(name string) (string, error) {
Copy link
Owner

Choose a reason for hiding this comment

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

I think the name is a little bit misleading and should have been named something like IdentityPathResolver since the function does not actually change or make a path absolute (as can be seen in the test)

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.

None yet

2 participants