Every file is checked with the same KRL parser that is used by the editor, so the result is identical with the check performed on a single file in the editor window.
Three things are verified in one pass:
- the balance and nesting of the ;FOLD / ;ENDFOLD lines,
- the KRL syntax (ANTLR grammar),
- warnings - for example a name in ;ENDFOLD (name) that does not match the name in the corresponding ;FOLD.
If the fold structure of a file is broken, the KRL syntax of this file is not checked at all - the parser cannot reliably remove the fold content from the program text. Such a file is reported explicitly, so that it is not mistaken for a file without errors.
Checked files
The plugin can check:
- the active file in the editor,
- all opened *.SRC files of the current session,
- all files found in a given directory - with a file filter (*.src by default) and optional recursive search.
Options
- File filter - which files are taken from the search directory.
- Directory - the directory to be searched.
- Search recursively - include all subdirectories.
- All opened *.SRC files - check the files of the current session instead of a directory.
- Open file in editor if any syntax error occurs - every file with an error is opened in a new editor tab.
- Report warnings as well - warnings are added to the report, not only errors.
Report
The findings are not shown in a message window - a scan of a whole robot archive produces far more lines than a dialog can display.
They are written to an HTML report: the file name, the line number and the message for every finding. At the end of the run a short summary is shown - how many files were checked, how many errors and - if collected - how many warnings were found, and the report can be saved from there.
The line numbers refer to the real line in the file, also for programs with folds.
The syntax check is started by the plugin itself, so it does not depend on the option Check programm syntax on file load in the KRC configuration panel.
All options are stored and restored the next time the plugin is started.