Skip to content

Commit

Permalink
more better pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudTT committed Sep 18, 2024
1 parent f9b5a22 commit 8029bfc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/lint-and-license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,24 @@ jobs:
echo "$clean_output" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
# Process output to group errors under file paths
# Process output to group errors under file paths with separators
grouped_errors=""
current_file=""
has_errors=false
while IFS= read -r line; do
if echo "$line" | grep -q '^\s*\/'; then
# Detected a file path line, update the current file
# Detected a file path line, add to grouped_errors if it contains errors
if [ "$has_errors" = true ]; then
grouped_errors+="---\n" # Add separator between error groups
has_errors=false # Reset error flag for the next file
fi
current_file="$line"
grouped_errors+="$line\n"
elif echo "$line" | grep -q 'error'; then
# Detected an error line, associate with the current file
grouped_errors+=" $line\n"
has_errors=true # Mark that this file has errors
fi
done <<< "$clean_output"
Expand Down

0 comments on commit 8029bfc

Please sign in to comment.