|
|
|
|
|
- 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
Project anomalies: dead code and orphan elements
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).
Displaying the dead code of the project To display the dead code of the project: - On the "Project" tab, in the "Audit and performance" group, expand "Static audit" and select "Dead code in the project".
- The window that lists the dead codes of your project is displayed.
- In this window, you can:
- Flag the procedure as used (see below).
- Delete the procedure.
- See the procedure.
- Start search.
Displaying the dead code of the current element To display the dead code of the current element: - Open the element to be analyzed in the editor: window, report, page, etc.
- On the "Project" tab, in the "Audit and performance" group, expand "Static audit" and select "Dead code in the current element".
- The window that lists the dead codes in the current element appears.
- 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.
- Start search: Allows you to find the procedure in the current project.
Displaying the orphan elements of project To display the orphan elements of project: - On the "Project" tab, in the "Audit and performance" group, expand "Static audit" and select "Orphan elements".
- The window used to list the orphan elements of your project is displayed.
- 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.
- Start 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: 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">
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|