How can i ignore generated files while using sloccount

551 Views Asked by At

how can i ignore sloccount.sc and xml files created when using sloccount I use the following command:

sloccount --duplicates --wide --details . | | sed "/\/\.svn\//d" | tee sloccount.sc

i am using sloccount version 2.26

But i am also unit tests results in the same folder as sloccount results, so sloccount picks up the XML Files

1

There are 1 best solutions below

0
On

I am using a following line to ignore the sloccount.sc:

sloccount --duplicates --wide --details . | grep -v sloccount.sc | tee sloccount.sc

You could add a | grep -v .xml in there to ignore the xml files, or use egrep to find .xml$ if you are worried about files that could have .xml in the middle of the name