From 87ce9c20cbe8065c7da6e09b1f6ecffce7ce513f Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Fri, 14 Aug 2026 01:30:51 +0300 Subject: [PATCH] Count and print sloc count in tools workflow --- .github/workflows/tools.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 88d1f25..1159677 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -46,3 +46,14 @@ jobs: echo -e "t,x,y,z\n0,1,2,3\n1,4,5,6" > log.csv ./csv_to_mcap.py log.csv test $(stat -c %s log.mcap) -eq 883 + sloc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: sudo apt-get install -y cloc jq + - name: Print source lines of code + run: cloc --by-file-by-lang flix + - name: Annotate total source lines + run: | + sloc=$(cloc flix --json | jq -r '.SUM.code') + echo "::notice title=SLOC::Current SLOC = $sloc"