Last active
July 23, 2016 00:00
-
-
Save nyarly/ca4fb3fbb8f8af4b30ecd9f1e330df9d to your computer and use it in GitHub Desktop.
Configs for coverage in Go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LegendEnable | |
| exec "au BufEnter,BufWinEnter ". expand('%:p') ." LegendEnable" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| coverdir=/tmp/sous-cover | |
| engulf -coverdir $coverdir -covermode=count -short -max-jobs=8 ./... | |
| res=$? | |
| legendary .cadre/coverage.vim $coverdir/*.coverprofile | |
| exit $res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'll need to
go get github.com/nyarly/engulf github.com/nyarly/legendaryto get all the tools involved.You'll also need a Vim plugin called 'killphi/vim-legend'
The test run with all coverage is more time consuming (like by about 10x) but it's generally not needed.
The result, though, will be signs in Vim that indicate test coverage of files while you're working, which I find super useful.
Futhermore
legendary --hitlist /tmp/sous-cover/*.coverprofilewill produce a list all code files, sorted by worst coverage in terms of absolute missed lines and by missed percentage.