Skip to content

asolfre/apex-static-analysis-sample

Repository files navigation

apex-static-analysis-sample

Build Status Codacy Badge Maintainability Test Coverage

Sample app to test apex static code analysis tools.

Codacy

See it live

Codeclimate

See it live

PMD

First, install PMD by running:

cd $HOME
curl -OL https://github.com/pmd/pmd/releases/download/pmd_releases%2F6.15.0/pmd-bin-6.15.0.zip
unzip pmd-bin-6.15.0.zip
alias pmd="$HOME/pmd-bin-6.15.0/bin/run.sh pmd

Then the analysis can be triggered with:

pmd -d . -R apex_ruleset.xml -f xml -reportfile pmd-report.xml -l apex

SonarCloud

As SonarCloud does not support Apex language, an attempt to use SonarCloud as other tools collector is done. A PMD analysis is triggered in TravisCI and exported to SonarCloud by specifiying 'sonar.java.pmd.reportPaths=./pmd-report.xml' in the sonar-project.properties.

TravisCI builds: https://travis-ci.org/asolfre/apex-static-analysis-sample/builds/

Live SonarCloud Project

About

Sample app to test apex static code analysis tools

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •