Evaluating Legacy Code
Over the years, as a project develops, its legacy code can become challenging to comprehend and manage. Every change affecting this code turns into a potential hazard. It is thus advisable to periodically assess the existing codebase to determine its quality and identify enhancement opportunities to improve clarity and maintainability.
With Scanyp, the dashboard presents a comprehensive analysis summary, divided into various focused sections:
- Header Section: This summarizes key metrics, including overall rating, maintainability, debt, coverage, and issues. From here, one can select specific project configurations or "perspectives" and refer to a particular analysis via "tags".
- Thresholds Section: This displays the status of analysis thresholds, enabling users to ascertain any breached quality standards. The section also traces the baseline threshold's progression.
- Team Skills Section: Scanyp offers a distinctive project scoring method based on categories like implementation, design, bug-free status, coverage, and documentation. The dashboard facilitates easy identification of skill gaps in the project. All metrics in this section can be clicked for detailed insights.
- Issues Section: This section enumerates the severity of issues from critical to low. Each metric can be delved into for more information. It also tracks newly introduced and resolved issues.
- Coverage Section: This displays the project's coverage percentage. Coverage data must be input during the scanyp command execution.
- Metrics Section: Features a radar chart to effortlessly monitor metrics such as total rating, maintainability, Line of Code (LOC), issues, and comments.
- Debt Section: Technical debt is a valuable metric estimating the effort required to address project issues. Scanyp shows the debt rating and the estimated days needed for issue resolution.
- Issues Difference Section: This tracks issue progression, helping to swiftly determine if issues have been addressed or if new ones have emerged compared to the baseline.
- Clones Section: Indicates the detected code clones in the project.
For a granular understanding of code components, the Code Insight feature is invaluable.
Beyond per-file metrics, Scanyp offers a logical project overview, represented by a tree structure on the page's left.
Clicking a code element provides insights into its metrics, relationships, and issues.
The Code Insight page encompasses:
- Debt and Issues Section: Displays a comparative analysis of issue severity and the associated technical debt for a specific code element against the baseline.
- LOC and Coverage Section: Reveals LOC, comments, complexity, and coverage metrics, alongside their progression when measured against the baseline.
- Design Metrics Section: Shares metrics associated with the design and dependencies of a particular code element.
The Code Insight also features the code map of the code element.
The size of the rectangle in the code map corresponds to the LOC metric, and its color mirrors code complexity, aiding in swiftly discerning intricate parts of the code.
Furthermore, the Code Insight page showcases two dependency graphs:
- Internal Dependency Graph: Illustrates dependencies among code elements within the selected code component.
- Code Element Dependency Graph: Demonstrates the relationships between callers and callees of the chosen code component.