Skip to main content

What types of rules are supported by Bluefactory Code Quality?

Code Quality features a set of rules, that span across Apex, Visualforce, Lightning components, and JavaScript.

Our ruleset is constantly evolving to incorporate all of Salesforce best practices into Bluefactory automated code review.

You can choose to exclude/include certain rules from Bluefactory analysis.

From the Code Quality dashboard click on the Edit button at the top right. Step 2 allows you to exclude:

  • Code Style. For example: Apex class naming conventions (CamelCase), Apex method naming conventions (CamelCase), If/Else statements must use braces...

  • Performance issues. For example: Avoid DML statements inside apex loops (FOR and WHILE), Avoid SOQL/SOSL queries inside apex loops (FOR and WHILE)...

  • Security issues. For example: Apex SOQL injection detection, Detect insecure end-point in Apex code, Detect Apex Cross Site Scripting(XSS) from URL Parameters...

  • Best Practices. For example: Apex unit test classes should have at least one Assert statement, Avoid using “@SeeAllData=True” in Apex test classes, Avoid logic in a trigger...

  • Design. For example: Avoid deeply nested If Statements, Detect Apex classes or methods with high complexity, Avoid excessive class length (too many lines of code in a single class)...

  • Error Prone. For example: Avoid direct Access to TriggerMap (Trigger.new[0]), Avoid hard-coded Ids in apex classes, Detect empty catch blocks....

Click on the excluded rule again to re-include it in the analysis.