From: TimePath Date: Mon, 28 Mar 2016 03:58:08 +0000 (+1100) Subject: cloc X-Git-Tag: xonotic-v0.8.2~747 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=027d3ed19bf8c51cda584db8049e07d7793c727b;p=xonotic%2Fxonotic-data.pk3dir.git cloc --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f826484fe..83a84305a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,12 @@ before_script: - cd gmqcc && make -j $(nproc) && export QCC="$PWD/gmqcc" - cd .. +report_cloc: + stage: test + script: + - cloc --force-lang-def=qcsrc/tools/cloc.txt --sql 1 --sql-project xonotic qcsrc | sqlite3 code.db + - sqlite3 code.db 'select file,nCode from t where nCode > 1000 order by nBlank+nComment+nCode desc' + test_compilation_units: stage: test script: diff --git a/qcsrc/tools/cloc.txt b/qcsrc/tools/cloc.txt new file mode 100644 index 000000000..9b1b3af3e --- /dev/null +++ b/qcsrc/tools/cloc.txt @@ -0,0 +1,13 @@ +QC + filter call_regexp_common C++ + filter remove_inline //.*$ + extension qc + extension inc + 3rd_gen_scale 0.5 + end_of_line_continuation \\$ +QC Header + filter call_regexp_common C++ + filter remove_inline //.*$ + extension qh + 3rd_gen_scale 0.5 + end_of_line_continuation \\$