ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Project editor / Project audits
  • Overview
  • How to?
  • Displaying the dead code of the project
  • Displaying the dead code of the current element
  • Displaying the orphan elements of project
  • Flagging a code section or an element as used
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
When developing a project, some sections of code are written and no longer used. Similarly, windows or reports can be created and not used anymore.
WINDEV, WEBDEV and WINDEV Mobile allow you to easily detect these "dead codes" and "orphan" elements.
The static audit returns a full report regarding the elements that cause problems in your project.
You also have the ability to specifically identify:
  • the unused procedures in the project (dead code).
  • the unused procedures in the current element (dead code).
  • the project elements that are not used (orphan elements).
How to?

Displaying the dead code of the project

To display the dead code of the project:
  1. On the "Project" tab, in the "Audit and performance" group, expand "Static audit" and select "Dead code in the project".
  2. The window that lists the dead codes of your project is displayed.
  3. In this window, you can:
    • Flag the procedure as used (see below).
    • Delete the procedure.
    • See the procedure.
    • Perform the search.

Displaying the dead code of the current element

To display the dead code of the current element:
  1. In the editor, display the element to study: window, report, page, ...
  2. On the "Project" tab, in the "Audit and performance" group, expand "Static audit" and select "Dead code in the current element".
  3. The window that lists the dead codes in the current element appears.
  4. In this window, you can:
    • Flag the procedure as used (see below).
    • Delete the procedure: Allows you to delete the procedure.
    • See the procedure: Allows you to display the procedure code. You also have the ability to double-click the procedure name.
    • Perform the search: Allows you to find the procedure in the current project.

Displaying the orphan elements of project

To display the orphan elements of project:
  1. On the "Project" tab, in the "Audit and performance" group, expand "Static audit" and select "Orphan elements".
  2. The window used to list the orphan elements of your project is displayed.
  3. In this window, you can:
    • Flag the element as used (see below).
    • Delete element: Allows you to delete the element.
    • See the element: Allows you to see the element.
    • Perform the search: Allows you to find the element in the project.

Flagging a code section or an element as used

Caution: In some case, the edition audit of the project or element may list elements that are considered as dead code or orphan elements. Indeed, these elements can correspond to:
  • procedures called in another project.
  • procedures or elements called in dynamic compilation.
  • elements whose name is built dynamically.
These elements can be marked as "used". Therefore, these elements will no longer be displayed in the list of unchecked elements. These elements will be displayed in the list of "Procedures or elements marked as used".
Marking an element as being unused
A window or a test page found in your project can be analyzed as being "unused". In order for this element to be directly registered in the elements marked as being unused, all you have to do is specify it in the "Declaration code of global variables" of the element via the following syntax:
<useful = "Reason">
where "Reason" corresponds to the text indicating to the developer why the element is found in the list of elements marked as being unused. This text will be displayed in the "Comment" column of the window for managing the orphan elements.
For example:
<useful = "Window for internal tests">
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/27/2022

Send a report | Local help