First get stats for each folder in a file.
for D in `find ./public/app/plugins/datasource -maxdepth 1 -type d`
do
echo $D && cloc $D
done > stats_plugin
Then clean the output with some regex :
# Clean parsing stats
(?<=plugins/.*$)[\s\S\n]*?lines/s\)
# Keep code sum only
Language[\s\S\n]*?-{79}[\s\S\n]*?-{79}\nSUM:( )+\d+( )+\d+( )+\d+( )+