]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
cloc
authorTimePath <andrew.hardaker1995@gmail.com>
Mon, 28 Mar 2016 03:58:08 +0000 (14:58 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 7 Aug 2016 02:50:29 +0000 (12:50 +1000)
.gitlab-ci.yml
qcsrc/tools/cloc.txt [new file with mode: 0644]

index f826484fe47d3f21861f142a09124d7754bb235a..83a84305a7615708203d7e34a15b3b573b61fb17 100644 (file)
@@ -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 (file)
index 0000000..9b1b3af
--- /dev/null
@@ -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 \\$