Skip to content

Commit dbd4489

Browse files
authored
Update pmd.yml
1 parent ce046e2 commit dbd4489

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/pmd.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ jobs:
115115
# Remove end-of-line comments, preserving quoted strings
116116
s/([^"'\''\\]*("[^"]*")?('\''[^'\'']*'\''?)?[^"'\''\\]*)[!].*$/\1/
117117
' "$file" > "$TMP_FILE"
118+
119+
if cmp -s "$file" "$TMP_FILE"; then
120+
rm "$TMP_FILE"
121+
else
122+
# Overwrite the original file with the processed content
123+
mv "$TMP_FILE" "$file"
124+
fi
118125
done
119126
120127
"${PMD_HOME}/bin/pmd" cpd \

0 commit comments

Comments
 (0)