QuickFix commands
For some rules that can be checked during precompilation, the Declaration Editor, the ST Editor and the Error List offer a QuickFix.
Procedure in the declaration or ST editor:
You can carry out automatic, immediate error handling directly at the affected code position by first clicking on the undercut code in the editor and then on the light bulb symbol. This will open a menu with the available QuickFix commands at this point.
Procedure in the error list:
To access the QuickFix commands in the error list, click on the"..." button in the respective message line in the error list which is displayed in the Action column.
Overview of QuickFix commands
Depending on the error, the following QuickFix commands are offered:
- Ignore error message/warning globally for the POU:
The command causes an attribute to be automatically inserted at the beginning of the declaration part of the programming object. Then a check of the associated rule for this programming object is excluded. - Ignore error message/warning:
The command causes pragmas or attributes to be automatically inserted into the code that exclude checking the associated rule for that line of code. - Disable checking:
The command causes the checking of the associated rule to be disabled in the settings. - Fix error by suggesting a change to the ST code:
For some rules, a change to the ST code is suggested to fix the error. Sample: - The rule is: SA0033: Unused variables
- Suggestion: "Remove unused variable"
- Consequence: The declaration of the unused variables is removed from the declaration editor.