QuickFix/Precompile

QuickFix/Precompile 1:

Available from TwinCAT 3.1 Build 4026

Some rules from Static Analysis can already be checked during precompilation. For the detection of such rule violations no explicit execution of the Static Analysis is necessary, but the check already takes place on the basis of the precompile information during editing. The checking of a rule during precompilation takes place only if the rule is enabled in the Static Analysis settings.

Precompile: Wavy underline and display in the message window

When a rule violation occurs, it is immediately indicated by wavy underline in the declaration editor or in the ST editor. Additionally - as long as the editor is open - error messages or warnings appear in the message window in the category "IntelliSense". These contain the note "(precompile)" following the rule number.

QuickFix commands

In addition, for some rules that can be checked during precompilation, there is the possibility of a QuickFix in the declaration editor and the ST editor. You can perform automatic, immediate error handling directly at the affected code locations. For quick error handling, click on the wavy underlined code in the editor and then click on the light bulb icon.

Depending on the error, the following QuickFix commands are offered:

Available rules

Please note that not all rules can be checked during precompilation. Based on the precompile information, the following rules are checked:
SA0001, SA0002, SA0011, SA0020, SA0022, SA0033, SA0034, SA0054, SA0090, SA0113, SA0114, SA0115, SA0117, SA0164, SA0168, SA0169, SA0170, SA0171