Skip to content

Commit 3c0682d

Browse files
committed
strip out majority of spaces
1 parent 27c9932 commit 3c0682d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/pmd.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,27 @@ jobs:
8585
s/[[:space:]]*\/[[:space:]]*/\//g
8686
s/[[:space:]]*\*\*[[:space:]]*/\*\*/g
8787

88+
# Remove spaces in common Fortran constructs (array indexing, function calls)
89+
s/\([[:space:]]*([^,)[:space:]]+)[[:space:]]*,/(\1,/g # First argument
90+
s/,[[:space:]]*([^,)[:space:]]+)[[:space:]]*,/,\1,/g # Middle arguments
91+
s/,[[:space:]]*([^,)[:space:]]+)[[:space:]]*\)/,\1)/g # Last argument
92+
s/\([[:space:]]*([^,)[:space:]]+)[[:space:]]*\)/(\1)/g # Single argument
93+
94+
# Remove spaces around brackets and parentheses
95+
s/\[[[:space:]]*/</g
96+
s/\[[[:space:]]*/>/g
97+
s/\[[[:space:]]*/</g
98+
s/[[:space:]]*\]/]/g
99+
s/\([[:space:]]*/(/g
100+
s/[[:space:]]*\)/)/g
101+
102+
# Remove spaces around comparison operators
103+
s/[[:space:]]*<=[[:space:]]*/</g
104+
s/[[:space:]]*>=[[:space:]]*/>/g
105+
s/[[:space:]]*<[[:space:]]*/</g
106+
s/[[:space:]]*>[[:space:]]*/>/g
107+
s/[[:space:]]*==[[:space:]]*/==/g
108+
88109
# Remove full-line comments
89110
/^\s*!/d
90111
/^[cC*dD]/d

0 commit comments

Comments
 (0)