Builtin instructions are inadvisable because of their risky nature

Software ResiliencyProgramming Best Practices

Why you should care

Certain built-in commands in VB/VB.net bring about unnecessary reliability risk to applications.

This unexpected application or machine behavior occurs a result of awkward/unreliable methods of handling errors and interacting with memory – that includes using pointers, forcing garbage collection, unstructured exception handling etc.

Business Impacts

The use of certain (unrecommended) built-in commands can increase the likelihood for applications to malfunction and fail in a production environment. Debugging and working with these commands can increase development time significantly.

Production RiskComplexity
5362

CAST recommendations

Identifying the built-in functions that can potentially cause reliability issues from the patterns above and encourage developers to seek alternatives to these risky commands. Documentation of most of these identified issues can be easily found online and in the references below.

How we detect

This code insight follows code which contains “system” and “gc“, count one violation each time “collect (” is encountered.

Count one violation each time following patterns are encountered :

  • objptr
  • strptr
  • varptr
  • ismissing
  • as new
  • resume
  • for … lbound
  • to … ubound

5362

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.

See featuresHow it works