Run PMD & CPD static analysis on CI machines
309
You can use this container to run pmd and cpd.
docker run --rm --mount type=bind,src=$(pwd),dst=/code nemooudeis/pmd pmd -d /code/src -R /code/pmd-ruleset.xml -f html -r pmd-report.html
docker run --rm --mount type=bind,src=$(pwd),dst=/code nemooudeis/pmd cpd --files /code/src --minimum-tokens 100
Or use it as a step within your build pipeline, in particular if other stuff is slow and you can run some static analysis in parallel e.g. with CircleCI
jobs:
ktlint:
docker:
- image: nemooudeis/pmd
steps:
- checkout
- run: |
mkdir reports
pmd -d src -R pmd-ruleset.xml -f html -r reports/pmd-report.html
pmd -d src -R pmd-ruleset.xml -f xml -r reports/pmd-report.xml
cpd --files src --minimum-tokens 100 > reports/pmd-report.txt
- store_artifacts:
path: reports
Content type
Image
Digest
Size
239.5 MB
Last updated
about 6 years ago
docker pull nemooudeis/pmd