summaryrefslogtreecommitdiffstats
path: root/.gitreview
blob: 9e6f9aef4e224124bf84da225d99f26803227c6a (plain)
1
2
3
4
5
[gerrit]
host=gerrit.automotivelinux.org
port=29418
project=AGL/meta-agl
defaultbranch=master
*/ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# (C) 2017 Jan-Simon Möller <dl9pf@gmx.de>
#
# License: GPLv2
#
# summary with
# cloc --sum-reports `find . -name "*clocreport" | grep -v "\-native" ` --out summary.report

CLOC_DIRECTORY ??= "${DEPLOY_DIR}/cloc/"
CLOCSTATEDIR = "${WORKDIR}/cloc-destdir/"

python do_cloc() {

    import subprocess

    source_dir = d.getVar('S', True)
    pn = d.getVar('PN', True)

    destdir = d.expand('${CLOCSTATEDIR}')
    bb.utils.mkdirhier(destdir)

    cloc_cmd = 'cloc %s -q --out=%s/%s.clocreport' % (source_dir, destdir, pn )
    subprocess.call(cloc_cmd, shell=True)

}


addtask cloc before do_configure after do_unpack

EXPORT_FUNCTIONS do_cloc