Skip to content

Commit 8cf02c0

Browse files
authored
Update pmd.yml
1 parent 31b873c commit 8cf02c0

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

.github/workflows/pmd.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,16 @@ jobs:
5656
# 2. Remove end-of-line comments (anything after '!' that isn't in a string)
5757
# 3. Preserve strings containing '!' characters
5858
sed -E '
59-
# Label for loop to handle multi-line continuations
6059
:a
61-
# If line ends with '&' (continuation character), append next line
6260
/&$/ {
6361
N
64-
# Replace '&' followed by newline, optional spaces, and another '&' with a single space
6562
s/&[[:space:]]*\n[[:space:]]*&/ /
66-
ba # Go back to label 'a' to process more continuations if present
63+
ba
6764
}
68-
# After handling all continuations, remove any remaining '&' characters
6965
s/&//g
70-
# Remove lines that are entirely comments:
71-
# - Lines starting with '!' (free form)
7266
/^\s*!/s/.*//
73-
# - Lines starting with 'c', 'C', '*', 'd', 'D' (fixed form, column 1)
7467
/^[cC*dD]/s/.*//
75-
# - Lines starting with space/tab and then 'c', 'C', '*', 'd', 'D' (fixed form with leading space)
7668
/^[ \t]*[cC*dD]/s/.*//
77-
78-
# Remove end-of-line comments, preserving '!' inside strings.
79-
# This pattern looks for '!' not preceded by an odd number of quotes.
80-
# It captures everything before the '!' as group 1 and replaces the whole line with group 1.
8169
s/([^"'\''\\]*("[^"]*")?('\''[^'\'']*'\''?)?[^"'\''\\]*)[!].*$/\1/
8270
' "$file" > "$TMP_FILE"
8371
# Check if file was actually modified before replacing

0 commit comments

Comments
 (0)