Verifying software components

Introduction

LN Studio enables you to perform quality control on the software components that you develop: you can use the Verify Component 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 Verify Component 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.
Note: The Verify Component command in LN Studio is based on the Verify Software Components (VSC) functionality on the LN server. See "Verify Software Components (VSC)" in the Web Help on the LN server.

Verifying software components

To verify one or more software components:

  1. Switch to the Application perspective.
  2. Select the desired components in the Activity Explorer. Right-click and select Verify Component. The verification process starts. The resulting warnings are displayed in the Verify Components view.
  3. Handle the generated warnings. See the following section.
Note: If the Build Automatically option in the Project menu is selected, the verification can also start automatically each time you save a component. To enable automatic verification, you must select the Automatically check components after a change check box in the Preferences - Workbench page.

Handling warnings

To handle warnings:

  1. 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 View Details. 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 Help in the Verify Warning Details dialog to view detailed information and examples, which will help you to solve the warning.
  2. 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:

    1. Click Verify Warning Filter in the view's toolbar. The Verify Components View Filter dialog appears.
    2. Select the Enabled check box and the Only blocking check box. Clear all remaining check boxes.
    3. Click OK to apply the filter.
  3. 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:

      1. Right-click the warning in the Verify Components view, and on the shortcut menu click View Details. The Verify Warning Details dialog starts.
      2. Select the Accept Warning check box and enter the reason for acceptance in the Accept Text field.
      3. Click OK.
      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:

      1. Right-click the warning in the Verify Components view, and on the shortcut menu click View Details. The Verify Warning Details dialog starts.
      2. Click Help to view detailed information and examples that can help you to solve the warning. Usually this information is displayed:
        • A description, a motivation and a possible solution for the warning.
        • A wrong example.
        • A correct example.
      3. Close the Verify Warning Details dialog and return to the Verify Components view.
      4. 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.

      5. Verify the component again. If no further errors are found, the warning automatically disappears from the warnings list.