Skip to content
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
de3a040
integrated pmd into CI (#646)
Malmahrouqi3 Jun 12, 2025
a1fe811
create rulset file
Malmahrouqi3 Jun 12, 2025
8defa9a
corrected directory
Malmahrouqi3 Jun 12, 2025
1fde2bc
changed ruleset pattern typo
Malmahrouqi3 Jun 12, 2025
0332cf1
added rules to python and fortran
Malmahrouqi3 Jun 12, 2025
9f46e71
ruleset for py
Malmahrouqi3 Jun 12, 2025
8c3fb08
individual rules
Malmahrouqi3 Jun 12, 2025
cd8e2a5
java rules - errorprone
Malmahrouqi3 Jun 12, 2025
4db4277
java rules
Malmahrouqi3 Jun 12, 2025
d6d3bc8
old school integration of PMD into workflow
Malmahrouqi3 Jun 12, 2025
54a6fc9
removed Detect File Changes
Malmahrouqi3 Jun 12, 2025
515c32a
changed to cat to display reports
Malmahrouqi3 Jun 13, 2025
4f4134a
added java compiler as dependency
Malmahrouqi3 Jun 13, 2025
b3ae8fa
removed something
Malmahrouqi3 Jun 13, 2025
085eaa5
just checking syntax
Malmahrouqi3 Jun 13, 2025
e3626f6
set env var pmd=/pmd/bin/pmd
Malmahrouqi3 Jun 13, 2025
f022a85
quick syntax correction
Malmahrouqi3 Jun 13, 2025
4fdb0c3
made PMD_COMMAND globally recognized
Malmahrouqi3 Jun 13, 2025
c7c1bdb
corrected package path
Malmahrouqi3 Jun 13, 2025
393d69b
moved alias command under Running PMD
Malmahrouqi3 Jun 13, 2025
7448609
comments removal
Jun 16, 2025
36fb29e
comments removal 2
Jun 16, 2025
76352dd
comments removal 3
Jun 16, 2025
0aa7abe
reduced number of tokens
Jun 16, 2025
d47b810
Merge branch 'master' into CI-pmd
Malmahrouqi3 Jun 16, 2025
52aeefc
Update pmd.yml
Malmahrouqi3 Jun 16, 2025
037c2e6
Update pmd.yml
Malmahrouqi3 Jun 16, 2025
26f3228
Update pmd.yml
Malmahrouqi3 Jun 16, 2025
9605a29
Update pmd.yml
Malmahrouqi3 Jun 16, 2025
3c01cfa
Update pmd.yml
Malmahrouqi3 Jun 16, 2025
d2fff04
Update pmd.yml
Malmahrouqi3 Jun 16, 2025
3bd04f3
Update pmd.yml
Malmahrouqi3 Jun 17, 2025
d4b77fb
Update pmd.yml
Malmahrouqi3 Jun 17, 2025
502ab2c
Update pmd.yml
Malmahrouqi3 Jun 17, 2025
23d44d3
Merge branch 'master' into CI-pmd
Malmahrouqi3 Jun 17, 2025
31b873c
Update pmd.yml
Malmahrouqi3 Jun 17, 2025
8cf02c0
Update pmd.yml
Malmahrouqi3 Jun 17, 2025
1008246
Update pmd.yml
Malmahrouqi3 Jun 17, 2025
cd8f908
Update pmd.yml
Malmahrouqi3 Jun 17, 2025
ae4cbf5
more cleanup
Malmahrouqi3 Jun 17, 2025
27c9932
tokens=20
Malmahrouqi3 Jun 17, 2025
3c0682d
strip out majority of spaces
Malmahrouqi3 Jun 17, 2025
d5f882e
Update pmd.yml
Malmahrouqi3 Jun 18, 2025
0806ba9
Update pmd.yml
Malmahrouqi3 Jun 18, 2025
972ae38
Update pmd.yml
Malmahrouqi3 Jun 18, 2025
f8527c2
Merge branch 'master' into CI-pmd
Malmahrouqi3 Jun 18, 2025
c20dacd
removed insignificant echo's
Jun 19, 2025
7e34b95
Merge branch 'master' into CI-pmd
Malmahrouqi3 Jun 19, 2025
4835989
Update pmd.yml
Malmahrouqi3 Jun 19, 2025
ce046e2
Update pmd.yml
Malmahrouqi3 Jun 19, 2025
dbd4489
Update pmd.yml
Malmahrouqi3 Jun 19, 2025
9fc6371
Update pmd.yml
sbryngelson Jun 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/pmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
find "$SOURCE_DIR" -type f \( -name "*.f" -o -name "*.f90" -o -name "*.for" -o -name "*.fpp" -o -name "*.F" -o -name "*.F90" \) -print0 |
while IFS= read -r -d $'\0' file; do
processed=$((processed + 1))
echo -e "[$processed/$total_files] Processing ${file}..."

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

# Remove full-line comments
/^\s*!/d
/^[cC*dD]/d
/^[ \t]*[cC*dD]/d
/^[[:space:]]*$/d
# Remove full-line comments
/^\s*!/d
/^[cC*dD]/d
/^[ \t]*[cC*dD]/d
/^[[:space:]]*$/d

# Remove end-of-line comments, preserving quoted strings
s/([^"'\''\\]*("[^"]*")?('\''[^'\'']*'\''?)?[^"'\''\\]*)[!].*$/\1/
' "$file" > "$TMP_FILE"

if cmp -s "$file" "$TMP_FILE"; then
echo -e "No changes needed for $file"
rm "$TMP_FILE"
else
# Overwrite the original file with the processed content
mv "$TMP_FILE" "$file"
echo -e "Successfully processed $file"
fi
done

Expand Down