Verifying software components
Introduction
LN Studio enables you to perform quality control on the software components that you develop: you can use the command to perform various checks, based on the LN design principles. When you verify software components, a list of warnings is generated. Per warning you can decide to accept the warning, or to solve the problem.
Among other things, the
command performs these actions:- Checks whether software development is performed according to the LN coding and programming standards.
- Searches for inconsistency in the Enterprise Server dictionary.
- Searches for suspicious constructions.
- Searches for constructions
the compiler will let through. For example:
- (Dynamic) function implementation.
- A message code is used in a script or library, but the message is expired or not present.
Verifying software components
To verify one or more software components:
- Switch to the Application perspective.
- Select the desired components in the Activity Explorer. Right-click and select . The verification process starts. The resulting warnings are displayed in the Verify Components view.
- Handle the generated warnings. See the following section.
Handling warnings
To handle warnings:
- View the list of warnings
and the warning details
View the generated warnings in the Verify Components view. To view detailed information for a warning, right-click the warning, and select . The Verify Warning Details dialog starts.
Each warning has various attributes, such as:
- verification code.
- Warning ID and message text.
- Component name
- Component type.
- Component subtype
- Location where the error occurs in the component. For example, a line number in a script.
- Priority: high, normal, suspicious, or low.
Note: You can click in the Verify Warning Details dialog to view detailed information and examples, which will help you to solve the warning. - Display the "blocking"
warnings
Depending on the verification filter settings, the component verification generates the following types of warnings:
- "Blocking" warnings. These warnings block the check in of software components. You must either solve or accept these warnings immediately.
- Other warnings that you do not have to handle immediately.
By default, the Verify Components view displays all generated warnings. You can apply a filter, so that the view displays "blocking" warnings only.
To display "blocking" warnings only:
- Click Verify Components View Filter dialog appears. in the view's toolbar. The
- Select the Enabled check box and the Only blocking check box. Clear all remaining check boxes.
- Click to apply the filter.
-
Accept or solve the warnings
For each "blocking" warning, you must decide whether you want to accept it or solve it.
For example, VSC has generated the following warning: "Possible missing break in case statement".
- If this break is not
missing, but left out on purpose, you can accept the warning.
To accept a warning:
- Right-click the warning in the Verify Components view, and on the shortcut menu click . The Verify Warning Details dialog starts.
- Select the Accept Warning check box and enter the reason for acceptance in the Accept Text field.
- Click .
Note: As a result of the verification filter settings that are specified in the Verification Filter Defaults (tlvsc2110m000) session:- VSC can block the acceptance of a warning. You cannot accept such a warning, but you must solve it.
- Some warnings can block the check in procedure for the component. You must solve these warnings, before you can check in the components.
- If this break was left
out accidentally, you must solve the warning.
To solve a warning:
- Right-click the warning in the Verify Components view, and on the shortcut menu click . The Verify Warning Details dialog starts.
- Click
- A description, a motivation and a possible solution for the warning.
- A wrong example.
- A correct example.
to view
detailed information and examples that can help you to solve the warning.
Usually this information is displayed:
- Close the Verify Warning Details dialog and return to the Verify Components view.
- Double-click the
warning. The appropriate editor for the software component starts automatically
at the location where the error occurs. Edit the software component and fix the
problem.
For example: VSC has generated the following warning "Possible missing break in case statement". When you double-click the warning, the script editor starts automatically at the relevant line number in the script or library, where you can add the missing statement.
- Verify the component again. If no further errors are found, the warning automatically disappears from the warnings list.
- If this break is not
missing, but left out on purpose, you can accept the warning.