Refactor LoC
This is the lines of code that were edited more than 3 weeks after merging. Refactoring is a common engineering practice and short-term increase in refactoring indicates the team is restructuring the code base.
Computation of the metric
- Changes to the codebase over time, including code modifications and merges into the main codebase, are tracked.
- The time elapsed since a code change was merged into the main codebase is determined.
- If a code change is edited more than three weeks after merging, it is classified as a "refactor."
- The Refactor LoC is calculated as the difference between initial LoC and final LoC after the edits.
Dashboards where this metric is used
- Dev Metric Grid
Use cases of the metric
- Evaluate the ongoing maintenance and improvement efforts by monitoring the percentage of code refactored, indicating the level of attention to code quality and technical debt reduction.
- Detect potential technical risks and areas of code complexity by analyzing patterns in refactoring activities, helping teams proactively address potential issues before they escalate into larger problems.
- Inform decision-making processes by assessing the need for resource allocation towards refactoring activities, ensuring a balanced approach to feature development and codebase maintenance.