Skip to content

Display code metrics #1059

Closed
Closed
@o2sh

Description

@o2sh

Summary 💡

Integrate rust-code-analysis into onefetch to extract code metrics such as cognitive and cyclomatic complexity. Additionally, we could introduce the new metric "churn" to identify frequently changing code segments - for that we can use gitoxide to count the number of commits on a file.

Display the aggregated metrics in onefetch's output.

Motivation 🔦

  • Developers can quickly identify the codebase complexity.

  • Churn metric: Highlighting areas with frequent changes provides insights into potentially high-risk and unstable code segments, aiding in prioritizing bug fixing and refactoring efforts.

Additional Considerations:

  • rust-code-analysis currently only supports C++, JavaScript, Python, Rust, and TypeScript.
  • Performance impact should be considered during analysis.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions