binhonglee / coco

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

use walkPattern instead of recursively invoking listFiles, listDirs #1

Closed timotheecour closed 5 years ago

timotheecour commented 5 years ago

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
samuelroy commented 5 years ago

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