0

I need to exclude *.c files only from some specific directory/sub_directory. Is this possible?

1 Answers1

0

cloc does not have a built-in way to do that. You can exclude all *.c, or exclude a specific dir/subdir, but not exclude *.c only within a dir/subdir.

A two-step solution comes to mind: you can make a list of files you want to exclude then pass that list file in to cloc with --exclude-list-file, for example,

    find dir/subdir -type f -name "*.c" > dont_want_these.txt
    cloc --exclude-list-file dont_want_these.txt dir
AlDanial
  • 419
  • 2
  • 4