Missing argument(s) in method call

objectscriptQuality release 
1.0.0
Id 
OS0058
Rule type 
Bug
Severity 

Blocker

Blocker
SQALE characteristic 
  • Reliability
    • Data
Tags 
runtime-failure
Remediation function 
Constant/issue
Remediation cost 
5min

Use the right number of parameters to the function call.

Noncompliant Code Example

Following code will compile, but on runtime will fail since the second argument is missing.

Class Sample.Foobar
{
    ClassMethod foo(x As %String, y As %String)
    {
        Write !,x
        Write !,y  // UNDEFINED
    }

    ClassMethod bar()
    {
        do ..foo("Hello")
    }
}

Exceptions

Note that this check will account for arguments with default values, which means that if in the code above foo is declared as:

ClassMethod m(x As %String, y As %String = "World")

then this issue will not be raised.