Why you should care
This provides 2 main benefits.
The first benefit is a lower memory consumption improving other all application’s performance. This is due to the fact that undeclared variables are automatically created as Variant (large memory consumption).
The second benefit is that this option helps the developer to detect typing errors when writing code.
Option Explicit is recommended for VB users as it allows for improving the business aspects of the application portfolios that are developed in the company. As such, Option Explicit should be utilized in the company’s style guides that encourage developers to focus on lowering memory consumption and improving performance for their respective applications.
How we detect
This code insight retrieves all VB Modules and Frames not using the Option explicit.
Physical Environments referenced in Code: Option Explicit ensures resources, and memory, are not being wasted when portfolios are being adopted for Cloud-Computing purposes.
About CAST and Highlight’s Code Insights
Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.