Apex Governor Limit Analyzer

0•

Estimates Salesforce governor limit consumption and identifies bulk-unsafe code patterns using static analysis.

The limit-usage skill provides a conservative, static analysis of Apex methods to predict governor limit consumption before runtime. By scanning for SOQL queries, DML statements, callouts, and async enqueues, it helps developers identify potential Limit Exceptions and bulk-safety issues without executing code. It specifically flags critical anti-patterns like DML or SOQL inside loops and missing static guards on asynchronous methods, making it an essential tool for maintaining high-performance Salesforce applications and ensuring code passes technical debt and security reviews.

主な機能

01Heuristic detection of DML and SOQL operations within loop constructs
02Static SOQL and DML count estimation per Apex method
03Validation of static guards (PRJ-6) for Queueable and Future methods
04Multi-format output including Markdown tables and SARIF for CI/CD
05Approximate transitive call resolution to flag nested limit risks
060 GitHub stars

ユースケース

01Automated code review during Salesforce DX workflows to flag high-risk methods before testing
02Identifying the root cause of 'Too many SOQL queries' errors in complex legacy classes
03Performing pre-deployment audits to ensure new Apex code follows bulk-safety best practices