From 4c9c1a50ce6317eff510ae05194f70112a9f86db Mon Sep 17 00:00:00 2001 From: EncodedVenom <32179912+EncodedVenom@users.noreply.github.com> Date: Sat, 19 Oct 2024 19:05:11 -0400 Subject: [PATCH] Testing warning labels --- .github/workflows/analysis.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/analysis.yaml b/.github/workflows/analysis.yaml index de5c2ae..06612f7 100644 --- a/.github/workflows/analysis.yaml +++ b/.github/workflows/analysis.yaml @@ -17,4 +17,14 @@ jobs: - name: Analyze continue-on-error: true run: | - luau-analyze src + output=$(luau-analyze src) + + # Parse the output and generate GitHub Actions warnings + echo "$output" | while IFS= read -r line; do + if [[ $line =~ (.+)\(([0-9]+),([0-9]+)\):\ (.*) ]]; then + file="${BASH_REMATCH[1]}" + line_number="${BASH_REMATCH[2]}" + message="${BASH_REMATCH[4]#TypeError: }" + echo "::warning file=$file,line=$line_number,col=0::$message" + fi + done