binhonglee / coco

Code coverage for Nim lang (CLI + library)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use walkPattern instead of recursively invoking listFiles, listDirs

timotheecour opened this issue · comments

could walkPattern be used to avoid calling compile_for_coverage recursively? seems a lot cleaner

task compile_for_coverage, "Compile tests files for code coverage":
    let target_dir = paramStr(2)
    for file in listFiles(target_dir):
        exec "nim --debugger:native --passC:--coverage --passL:--coverage c " & file
    for dir in listDirs(target_dir):
        exec "nimble compile_for_coverage " & dir
commented

yup clearly, I will use it in the command line utility #2