Code Inspection: Undefined variable
Produces two types of warnings:
Undefined variable: the variable's definition is not found in the built-in library and project files.
Variable might have not been defined: there are one or more paths to reach the line with the variable usage without defining it.
Use the options below to customize the inspection:
Report that variable is probably undefined: clear the checkbox to disable the Variable might have not been defined warnings.
Enable inspection in global space: by default, the inspection is enabled for global space. Clear the checkbox to only report undefined variables from functions' local scope.
Search for variable's definition outside the current file: if selected, the IDE reports a global variable as undefined only in case there are no
requirestatements in the current file and the variable's definition cannot be found in the project.
Otherwise, if not selected, the IDE searches for the variable's definition only in the current file and ignores the
requirestatements if any.
Suppress an inspection in the editor
Position the caret at the highlighted line and press Alt+Enter or click .
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.