{"repo":"dave/courtney","free":true,"listed":false,"github":"https://github.com/dave/courtney","clone":"git clone https://github.com/dave/courtney.git","description":"Courtney is a coverage tool for Go","language":"Go","stars":179,"topics":["go","golang","testing","testing-tools","coverage","coverage-files","test-coverage"],"license":"MIT","category":"dev-tools","readme_excerpt":"Courtney Courtney makes your code coverage more meaningful, by excluding some of the less important parts. 1. Packages are tested with coverage. 2. Coverage files are merged. 3. Some code is less important to test. This is excluded from the coverage file. 4. Optionally we enforce that all remaining code is covered. Excludes What do we exclude from the coverage report? Blocks including a panic If you need to test that your code panics correctly, it should probably be an error rather than a panic. Notest comments Blocks or files with a // notest comment are excluded. Blocks returning an error tested to be non-nil We only exclude blocks where the error being returned has been tested to be non-nil, so: ... however: All errors are originally created with code similar to errors.New , which is not excluded from the coverage report - it's important your tests hit these. It's less important your tests cover all the points that an existing non-nil error is passed back, so these are excluded. A few more rules: If multiple return values are returned, error must be the last, and all others must be nil or zero values. We also exclude blocks returning an error which is the result of a function taking a non-nil error as a parameter, e.g. errors.Wrap(err, \"...\") . We also exclude blocks containing a bare return statement, where the function has named result parameters, and the last result is an error that has been tested non-nil. Be aware that in this scenario no attempt is made to verify tha","default_branch":null,"files":null,"tree":[],"storefront":"/r/dave","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dave/courtney/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}