Skip to content

Commit a1da667

Browse files
pmd into Workflow (#882)
Co-authored-by: Spencer Bryngelson <shb@gatech.edu>
1 parent 8e94d0a commit a1da667

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/pmd.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Source DRYness
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
pmd:
7+
name: PMD
8+
runs-on: "ubuntu-latest"
9+
env:
10+
pr_everything: 0
11+
steps:
12+
- name: Clone - PR
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Java
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: temurin
19+
java-version: '17'
20+
21+
- name: Run CPD for Fortran
22+
continue-on-error: true
23+
run: |
24+
# Get latest PMD version from GitHub API
25+
PMD_VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | grep '"tag_name":' | cut -d'"' -f4 | sed 's/pmd_releases\///')
26+
echo "Using PMD version: $PMD_VERSION"
27+
28+
curl -sSL -o pmd.zip \
29+
"https://github.com/pmd/pmd/releases/download/pmd_releases/${PMD_VERSION}/pmd-dist-${PMD_VERSION}-bin.zip"
30+
unzip -q pmd.zip
31+
PMD_HOME="pmd-bin-${PMD_VERSION}"
32+
33+
"${PMD_HOME}/bin/pmd" cpd \
34+
--dir src \
35+
--language fortran \
36+
--minimum-tokens=40

0 commit comments

Comments
 (0)