jecs/scripts/gh-warn-luau-analyze.sh

13 lines
506 B
Bash
Raw Permalink Normal View History

2024-10-20 00:04:29 +00:00
# Read the input file line by line
while IFS= read -r line; do
# Use regex to capture file name, line number, column number, and message
if [[ $line =~ ^(.+)\(([0-9]+),([0-9]+)\):\ (.+)$ ]]; then
file="${BASH_REMATCH[1]}"
line_number="${BASH_REMATCH[2]}"
column_number="${BASH_REMATCH[3]}"
message="${BASH_REMATCH[4]}"
2024-10-19 23:53:43 +00:00
2024-10-20 00:04:29 +00:00
# Format output for GitHub Actions
echo "::warning file=$file,line=$line_number,col=$column_number::${message}"
2024-10-19 23:47:26 +00:00
fi
2024-10-20 00:04:29 +00:00
done < "$1"