Skip to content

Add variable functions to coverage#2

Open
thatcode wants to merge 3 commits intoFabianexe:mainfrom
thatcode:thatcode/add-function-variables
Open

Add variable functions to coverage#2
thatcode wants to merge 3 commits intoFabianexe:mainfrom
thatcode:thatcode/add-function-variables

Conversation

@thatcode
Copy link

Some projects have functions in the form:

var foo = func() {
    // Some code here.
}

This commit adds this code to code coverage metrics.

While this code does work, I'm not happy with lines 77->81 (nesting 5 deep? Not good...) or the duplication of code between lines 53->76 and 82->104. Suggestions on how to improve very much appreciated!

Some projects have functions in the form:
```
var foo = func() {
    // Some code here.
}
```

This commit adds this code to code coverage metrics.
package cleaner

import (
"github.com/Fabianexe/gocoverageplus/pkg/entity"
Copy link
Author

Choose a reason for hiding this comment

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

OK, obviously I don't intend for these changes to be merged in this repo. It was the easiest way for me to make this code buildable and testable on my repo.

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.

1 participant