cepheid

An Aurora 4X clone
Log | Files | Refs | README

commit 08e2e960a1e8fb8dc76e55a7133539566408137a
parent cbf9612aaec6926e5e953b2c308d6c9b75bd7a55
Author: hhvn <dev@hhvn.uk>
Date:   Sun, 27 Nov 2022 20:47:48 +0000

sloccount wrapper to count accurately

Diffstat:
Adev/sloccount | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/dev/sloccount b/dev/sloccount @@ -0,0 +1,13 @@ +#!/bin/sh +# +# Cepheid relies on a lot of code generation, so it can be difficult to count +# sloc, this script counts only files tracked by git. +# +# It also counts the counts (but not the .c files generated with boilerplate). + +for f in tests/*.test; do + sed 's/%{/int func(void) {/' < $f > $f.tmp.c +done + +sloccount "$@" $(git ls-files) tests/*.tmp.c +rm tests/*.tmp.c