Releases: corsc/go-tools
Release list
Fix logic error in Package Coverage Single Dir mode
What's Changed
- make "ThisCodeDoesntReallyDoAnything" un-exported by @yashschandra in #30
- show total line covered in coverage output by @yashschandra in #31
- Fixed the issue that double quote got escaped in exec by @xueliangliang in #32
New Contributors
- @yashschandra made their first contribution in #30
- @xueliangliang made their first contribution in #32
Full Changelog: package-coverage/v1.2.6...package-coverage/v1.3.4
Address concurrency issues in Package Coverage
package-coverage/v1.2.6 [PackageCoverage] Address clean up race condition with fake test/code
Package coverage
Adjustments to Package coverage:
- Add better logging of test errors
- Remove strange data-race like issue with fake_xx.go creation and removal
- Avoid adding fake_code/tests for unknown packages
Remove use of commons code
Following the axiom "a little copying is better than a little dep" this version removes the use of the common code and instead embeds that code into each project.
It is hoped that it will now be possible to do GO111MODULE=on go get github.com/corsc/go-tools/fiximports@v1.2.3 (and similar for other tools)
Edit: This is still not possible 🤦
Adopting Go Modules (and MR structure)
v1.2.2 [All] Quickly add Go Mod support and vendor deps
Adopting Go Modules (and MR structure)
Added support for race testing during coverage calculation
This feature allows CI servers to calculate coverage and race test at the same time (instead of 2 different processes)
MVP release
This tool intents to calculate the test coverage of a particular package (including any sub packages).
Commands:
$ package-coverage -c ./will generate coverage. 1 coverage file (*.cov) per package$ package-coverage -d ./will remove any previous coverage files (will remove all *.cov files)$ package-coverage -p ./will import all coverage files under the supplied dir and output the summary.$ package-coverage -c -p -d ./all of the above
Output Sample
% Statements Package
50.00 240 sage42.org/go-tools/package-coverage/
42.47 73 sage42.org/go-tools/package-coverage/generator/
65.52 87 sage42.org/go-tools/package-coverage/parser/
58.18 55 sage42.org/go-tools/package-coverage/utils/
Initial release of Package Coverage and GoMetalinter script
This is the initial release and as you could expect contains very little and also contains many areas for improvement.
To use "Package Coverage" please see the README in the package-coverage directory.
To use "gometalinter" convenience script use $./scripts/gometalinter.sh ./... or similar
Intended areas of improvement:
- Move the features of
package-coverage/coverage.shinto the binary and remove this script - Change the coverage calculation to be able to properly handle packages with no tests in them (currently they are ignored)
P.S. Included binary here compiled on darwin x86_64 is for convenience only.