Syntax check *frosted* can not detect all types of errors

Issue #46 resolved
M. Gronle created an issue

Usually frosted (bug symbols in left column of script editor), should be able to detect if an uninitialized variable is used somewhere in the script. However, currently this type of error is not detected. The cause for this is, that frosted can only detect this types of errors if no statement like from XYZ import * is within the script (since then, no clear knowledge about exernally defined variables... is available for frosted. However, the line

from itom import *

is always prepended to each script before calling the frosted syntax check, since all classes and methods from itom are (per default) globally imported to the global workspace and we then want to avoid that frosted says for instance that dataObject is not defined. However, due to this line, no variable name checks can be done for the script.

Task: replace from itom import * by something like from itom import dataObject, dataIO, actuator, filter, pluginHelp... (However the list of items should somehow be generated automatically).

Location: PythonEngine::pythonSyntaxCheck in pythonEngine.cpp

Comments (1)

  1. Log in to comment