Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Gloop Code Inspection and Analysis

The Gloop Service Editor also features linting; it analyzes code for potential errors. When a Gloop Service is opened or modified, Coder will validate the content and configuration of the service's steps to warn the user about probable runtime errors.

Depending on the severity of the problem detected, Coder will either label it as a warning or an error. A warning label indicates that the step will not cause a runtime error but is implementing unsafe logic or bad practice. An error label, on the other hand, indicates that the problem will cause a runtime error when the Gloop Service is executed.

All problematic steps will be flagged via a warning or error icon near the line ruler. Hovering over an icon prompts a tooltip to pop-up, describing the issue(s) of the step.

Hovering over the warning or error icon shows the description of the problem

Hovering over the warning or error icon shows the description of the problem

Problems in child steps

If a step containing other steps, like the Block Step, contains a problematic child step, a grayed-out icon is displayed next to it (the parent step). Hovering over this grayed icon shows the summary of all problems encountered under that step1.

As an alternative, you can use the Problems view to view all the problems of your Gloop Service. If the Problems view is not visible, go to the application menu Window > Show View > Problems View.

The _Problems_ view

The _Problems_ view

Quick Fixes

Coder offers a quick fix for most problems. A quick fix is a short series of actions that can be executed in order to repair offending code. To apply a quick fix:

  1. Right click the offending line in the line ruler and then select Quick Fix from the context menu. Alternatively, you may press (Coder Studio) or (Coder Cloud) instead. Either of these actions prompt the quick fix pop-up to appear.
  2. If the step has more than one problem, choose which problem to fix. You can use your arrow keys to shuffle through the choices and the key to finalize your selection.
  3. Choose which quick fix to apply; some problems have more than one solution or quick fix available.
  4. Enter required inputs, if any, as some quick fixes require certain inputs like entering a value or expression.

Once the quick fix has been applied, the warning or error icon should disappear. Below is a demonstration:

Applying quick fixes

Applying quick fixes

Content assist + quick fix

Coder's content assist and quick fix feature works really well together and can be combined to write Gloop Services faster.

Using content assist and quick fix together

List of Detectable Problems and Their Quick Fix Suggestions

  • Invalid Map Lines or Set Expressions
    • Description: Maps or sets a property that does not exist.
    • Severity: Error
    • Available quick fixes:
      • Re-assign Map Line or Set Expression
      • Delete Map Line or Set Expression
  • Invalid Iterate or While Step input or output array
    • Description: Input or output array does not exist.
    • Severity: Error
    • Available quick fixes:
      • Set input or output array
      • Clear input or output array of the step
  • Invalid declared property
    • Description: A property is declared on a model that does not exist.
    • Severity: Error
    • Available quick fixes:
      • Delete declared property
  • Invalid unload property
    • Description: A property that does not exist is unloaded.
    • Severity: Error
    • Available quick fixes:
      • Delete unload
  • Invalid unevaluated While Step expression
    • Description: Unevaluated While Step expression must be an integer.
    • Severity: Error
    • Available quick fixes:
      • Edit expression
  • Empty While Step expression
    • Severity: Warning
    • Available quick fixes:
      • Edit expression
  • Empty Fork Step expression
    • Severity: Warning
    • Available quick fixes:
      • Edit expression
  • Invalid Break Step expression
    • Description: Unevaluated expression must be one of the labels above the step or a proper Gloop keyword, for example $gloopIterate must be used within a Iterate Step.
    • Severity: Error
    • Available quick fixes:
      • Edit expression
  • Empty step label of Fork Step child
    • Description: All the steps under a Fork Step must have a label.
    • Severity: Warning
    • Available quick fixes:
      • Edit step label
  • Duplicated step label
    • Description: Steps within the same context or level2 should have a unique label.
    • Severity: Warning
    • Available quick fixes:
      • Edit step label
  • Invalid asynchronous Invoke Step
    • Description: Asynchronous Invoke Step should not have an output Map Line, Set Expression, declared property, or unload property.
    • Severity: Warning
    • Available quick fixes:
      • Make Invoke Step synchronous
  • Unhandled Invoke Step exception
    • Description: Some Invoke Steps throw an exception; such steps should be wrapped in a try-block.
    • Severity: Warning
    • Available quick fixes:
      • Wrap step in a try/catch and log error message
      • Wrap step in a try/catch, log error exception and write message
      • Wrap step in a try/catch
      • Wrap step in try/catch/finally
      • Wrap step in try/finally
  • Invalid unevaluated Set Expression
    • Description: An unevaluated expression assigned on a property should have the right type; for example, the Set Expression on a GloopInteger should be a number.
    • Severity: Error
    • Available quick fixes:
      • Edit Set Expression
  • Unmapped non-nullable Invoke Step input property
    • Description: Some Invoke Steps have input properties that are marked as non-nullable (Allow Null: false); such properties should be either mapped or have a Set Expression.
    • Severity: Error
    • Available quick fixes:
      • Map a property
      • Add a Set Expression

  1. In other words, all issues of the child steps. 

  2. In other words, steps that are siblings.