The Apex Code Quality report uses PMD static code analysis on selected apex classes and triggers. Over 50 different quality problems are reported, including best practices, code style, performance issues, and security vulnerabilities. This is useful for Org monitoring and technical debt reduction. This interface is available by right clicking an item on the desktop and also from the Options Menu.
Video
The Metazoa Snapshot Apex Code Quality Report is a robust tool for auditing the quality of your Apex code. It provides you with detailed reports and the option to manage your quality metrics and set up automated alerts based on predefined rules. You can leverage this tool to maintain a high standard of code quality across your Salesforce org.
Usage Instructions
-
Accessing the Apex Code Quality Report:
- Right-click on any snapshot.
- Select "Apex Code Quality" from the dropdown list.
- A three-pane report will appear.
-
Understanding the Report:
- The left pane lists your Apex classes.
- Selecting a class will display a code quality report in the middle pane.
- The report contains identified rule problems, start and stop lines, links to additional documentation, and details about each quality issue.
- Each rule can be selected, and its specific issue is highlighted in the left pane's code.
-
Managing Quality Metrics:
- Click the "Manage Quality" button.
- Here, you can select which rules to include in the report and set priorities for each rule.
- Detailed descriptions of each rule are available, which can help you understand their impact on your code.
- You can set your quality thresholds as per your specific requirements.
-
Scheduling the Report:
- Schedule reports to be sent automatically. For instance, a new snapshot can trigger the dispatch of a PDF report via email to the admins.
- Report generation can be conditional, depending on the changes detected or specific thresholds.
-
Code Quality in Deployment:
- When creating assets for deployment, you can select Apex classes for quality checks.
- Click on the "Test Code Quality" button in the deployment interface.
- Click on "Manage" to adjust the quality levels of interest.
- The deployment process can be halted if reported problems surpass a certain priority level.
- If a deployment is stopped due to quality issues, a list of the problems is displayed for review.
Conclusion
Metazoa Snapshot Apex Code Quality Report is a versatile and powerful tool for maintaining high code quality standards in your Salesforce org. It not only helps in identifying issues but also offers functionality for automating the code quality review process and acting as a gatekeeper during code deployments.
Links
Snapshot Use Cases: Salesforce Org Cleanup and Optimization
Blog Post: The New Code Quality Report