Al Danial - 2014-07-01

Wow, that's convoluted. I'm not keen to implement this.

Not to leave you empty handed, you could use cloc's --exclude-dir option to avoid counts in these directories. This one liner

perl -n -e 'if (/ProjectExplorer.BuildConfiguration.BuildDirectory/) {m{>(.*?)</value}; push @a, $1}; END {print "cloc --exclude-dir ", join ",", @a}' PW2.pro.user

produces

cloc --exclude-dir /data/romas/bmstu/term/6/modelling/lab/other/lab3/build-PW2-Desktop-Debug,/data/romas/bmstu/term/6/modelling/lab/other/lab3/build-PW2-Desktop

which is the start of an invocation that will skip the contents of the build directories.