Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore files based on suffix in cloc..?

It should be a trivial task but neither reading through the docs and man page nor googling brought up a solution to what I'm trying to achieve:

cloc is scanning our source tree and we want it to ignore all *.html and *.css files.

Is there some way to give cloc a list of file extensions to ignore..?

like image 740
ATV Avatar asked Jun 23 '16 09:06

ATV


1 Answers

Reading the help , via cloc --help, gives:

--exclude-ext=<ext1>[,<ext2>[...]] 
Do not count files having the given file name extensions.

I tried

cloc <file(s)/dir(s)> --exclude-ext=html,css

and it worked as expected.

like image 78
MartinW Avatar answered Oct 12 '22 19:10

MartinW