jecs/.github/workflows/analysis.yaml
2024-10-19 19:16:21 -04:00

29 lines
906 B
YAML

name: Analysis
on: [push, pull_request, workflow_dispatch]
jobs:
run:
name: Run Luau Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Install Luau
uses: encodedvenom/install-luau@v2.1
- name: Analyze
run: |
output=$(luau-analyze src || true) # Suppress errors for now.
# 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