binhonglee / coco

Code coverage for Nim lang (CLI + library)
MIT License
46 stars 3 forks source link

`Clean up past reports` buggy; ignores report_path ; coverage shouldn't be checked in? #7

Closed timotheecour closed 5 years ago

timotheecour commented 5 years ago

running ./coco shouldn't affect git status ;

git clone https://github.com/samuelroy/coco
cd coco
nimble build
./coco --report_path=/tmp/d19
git status
        deleted:    coverage/amber.png
        deleted:    coverage/emerald.png
        deleted:    coverage/gcov.css
        deleted:    coverage/glass.png
        deleted:    coverage/index-sort-f.html
        deleted:    coverage/index-sort-l.html
        deleted:    coverage/index.html
        deleted:    coverage/nim-coverage/coco.nim.func-sort-c.html
        deleted:    coverage/nim-coverage/coco.nim.func.html
        deleted:    coverage/nim-coverage/coco.nim.gcov.html
        deleted:    coverage/nim-coverage/index-sort-f.html
        deleted:    coverage/nim-coverage/index-sort-l.html
        deleted:    coverage/nim-coverage/index.html
        deleted:    coverage/ruby.png
        deleted:    coverage/snow.png
        deleted:    coverage/updown.png
        modified:   lcov.info

        tests/compilation
        tests/foo
        tests/report/cleanup_past_report
        tests/report/generate_coverage
samuelroy commented 5 years ago

@timotheecour coverage/ in this repo is only used as an example of the report generated by Coco.

About --report_path it does the job correctly, cleanup then creating the report at that path. When you ran the command ./coco, it ran my tests and one was removing coverage/. Totally unnecessary and confusing. It's fixed now.

Agree about git status. It should stay clean as much as possible. Now, by default, you should only get 1 directory with the HTML report (I should add an option to disable the generation) and your LCOV file. This one is really useful in your project as it's read by Coverage Gutters in VSCode.