Skip to content

Commit e89abc6

Browse files
Malmahrouqi3mohdsaid497566sbryngelson
authored
Cleaned up two echo's off PMD.yml (#894)
Co-authored-by: mohdsaid497566 <mohdsaid497566@gmail.com> Co-authored-by: Spencer Bryngelson <shb@gatech.edu>
1 parent 82b2dea commit e89abc6

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/pmd.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
find "$SOURCE_DIR" -type f \( -name "*.f" -o -name "*.f90" -o -name "*.for" -o -name "*.fpp" -o -name "*.F" -o -name "*.F90" \) -print0 |
3838
while IFS= read -r -d $'\0' file; do
3939
processed=$((processed + 1))
40-
echo -e "[$processed/$total_files] Processing ${file}..."
4140

4241
# Create a temporary file with same permissions as original
4342
TMP_FILE=$(mktemp)
@@ -106,23 +105,21 @@ jobs:
106105
s/[[:space:]]*>[[:space:]]*/>/g
107106
s/[[:space:]]*==[[:space:]]*/==/g
108107

109-
# Remove full-line comments
110-
/^\s*!/d
111-
/^[cC*dD]/d
112-
/^[ \t]*[cC*dD]/d
113-
/^[[:space:]]*$/d
108+
# Remove full-line comments
109+
/^\s*!/d
110+
/^[cC*dD]/d
111+
/^[ \t]*[cC*dD]/d
112+
/^[[:space:]]*$/d
114113

115114
# Remove end-of-line comments, preserving quoted strings
116115
s/([^"'\''\\]*("[^"]*")?('\''[^'\'']*'\''?)?[^"'\''\\]*)[!].*$/\1/
117116
' "$file" > "$TMP_FILE"
118-
117+
119118
if cmp -s "$file" "$TMP_FILE"; then
120-
echo -e "No changes needed for $file"
121119
rm "$TMP_FILE"
122120
else
123121
# Overwrite the original file with the processed content
124122
mv "$TMP_FILE" "$file"
125-
echo -e "Successfully processed $file"
126123
fi
127124
done
128125

0 commit comments

Comments
 (0)