Gearset’s customizable static code analysis helps teams develop high quality coding standards that fit their release process. As well as running during manual deployments and in change monitoring jobs, Gearset’s static code analysis now also automatically runs as part of your Continuous Integration (CI) jobs.
Configure your rule set and Gearset will automatically perform your code analysis every time a CI job runs, making it easy to manage the quality and style of your Apex and ensure problems are caught early for all of your continuous deployments.
Customize your static code analysis
To make sure your code analysis is personalised to fit your team’s release process and coding standards, you can configure your rule set. Team owners can turn static code analysis rules on and off, customise individual rules and choose to exclude specific packages and classes. If you need help configuring your rule set, check out our free support guide.
View the results of the static code analysis performed in your CI jobs
Static code analysis results will be generated automatically every time a CI job runs (if you need help setting up a CI job take a look at our walkthrough guide).
To find your static code analysis results, navigate to the CI Jobs page and click View history
to see the results of one of your CI jobs. Click View code analysis…
for any of the job runs to see the full rundown of the changing state of your Apex code.

When you view your code analysis results for each job run, Gearset will display any detected rule violations and group them within the class that they belong to. You can click the menu on the left to view specific violation categories or use the text filter to narrow your results down to a specific class.

For any violation detected, Gearset will tell you which line of code the issue begins on and provide a description of the violation, so you can easily understand why issues have been flagged. For more detailed information on each specific rule, click the name of the rule and you’ll be taken to the PMD library for a more in-depth look at the individual rule and its implementation.

Want to try out Gearset’s static code analysis?
Fully configurable static code analysis will help your team maintain consistent, best-practice coding standards for all of your deployments, so you can be confident that your team will be developing at their best — start your free 30-day trial with Gearset today.