ACR Rules

⌘K
  1. Home
  2. Docs
  3. ACR Rules
  4. Reliability (41)
  5. Only variables that are not empty should be returned or assigned

Only variables that are not empty should be returned or assigned

This is likely a bug. If a certain object, variable or attribute is empty it should not be returned. Instead, return an explicit empty.

Noncompliant example:

if $Object = empty
then $Object/Attribute
// guaranteed to be empty
else 'not found'

Compliant example:

if $Object = empty
then 'not found'
else $Object/Attribute