Method is defined with ReturnType value but has QUIT or RETURN without arguments.

Noncompliant Code Example

Following code will compile, but on runtime the bar method will fail with "COMMAND error" message.

Consider this code:

    Class Fubar
    {

    Property foo;

    Method m()
    {
        set i%foo("bar") = "baz"
    }

    }

This code will fail at runtime, since the foo property is not declared as MultiDimensional. It should be declared as such:

    Property foo [ Multidimensional ];

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.

ObjectScript only account for the 31 first characters in a local variable name; further characters will be ignored.

This check ensures that all declared local variables have a length less than, or equal to, 31 characters.

See here for more information.

This check ensures that if a method or class method is declared to return a value, such as in:

    Method foo() As %String
    {
        // code here
    }

then all code paths eventually either return a value of throw an exception.

Limitations: macros

ObjectScript allows to use macros as statements. But macros are not expanded. It is therefore the choice of the plugin user as to whether to consider macros as violating this rule.

Pages