Skip to content

Commit c08f3a5

Browse files
Update codacybootstrap.yml
1 parent 5169182 commit c08f3a5

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/codacybootstrap.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,21 @@ jobs:
8181
8282
title="[$category] $message"
8383
84-
# ---- Build code snippet safely ----
84+
# Build code snippet first
8585
if [ -n "$line_text" ]; then
8686
code_snippet="**Code Snippet:**\n\`\`\`csharp\n$line_text\n\`\`\`\n\n"
8787
else
8888
code_snippet=""
8989
fi
90-
91-
# Build body using single-quoted heredoc to avoid backtick issues
92-
body=$(cat <<'EOF'
93-
**File:** `'"$file"'`
94-
**Line:** '"$line"'
95-
**Rule:** '"$category"' ('"$severity"')
96-
**Commit:** `'"$sha"'`
9790
98-
'"$code_snippet"'**Codacy ID:** `'"$id"'`
91+
# Build body safely using double-quoted heredoc
92+
body=$(cat <<EOF
93+
**File:** \`$file\`
94+
**Line:** $line
95+
**Rule:** $category ($severity)
96+
**Commit:** \`$sha\`
97+
98+
$code_snippet**Codacy ID:** \`$id\`
9999
EOF
100100
)
101101

0 commit comments

Comments
 (0)