binhonglee/coco

use walkPattern instead of recursively invoking listFiles, listDirs

timotheecour opened this issue · 1 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

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