Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.89 KB

quality_code_complexity_analysis.md

File metadata and controls

51 lines (37 loc) · 1.89 KB

Code Complexity Analysis

Objective: Analyze the codebase to identify areas with high cyclomatic complexity, deep nesting, or excessive method lengths, providing insights into potential readability and maintainability issues.

Instructions:

  1. Review the codebase and identify areas with:

    • High cyclomatic complexity
    • Deep nesting
    • Excessive method lengths
  2. For each identified issue, analyze: a. Location:

    • File path
    • Line number(s)

    b. Description:

    • Brief explanation of the complexity issue

    c. Impact:

    • Potential effects on code readability
    • Potential effects on code maintainability

    d. Refactoring Suggestions:

    • Propose methods to simplify or restructure the code
    • Suggest alternative approaches to reduce complexity
  3. If no significant issues are found, provide a summary stating that the codebase has acceptable complexity levels.

  4. Consider the overall complexity trends in the codebase:

    • Are there specific areas or modules that consistently show higher complexity?
    • Are there patterns in the types of complexity issues encountered?
  5. Suggest general best practices or coding standards that could help prevent future complexity issues.

Expected Output: A comprehensive analysis of the codebase's complexity, detailing specific issues found, their impact, and suggestions for improvement. The report should include:

  1. An overview of the complexity analysis findings
  2. Detailed breakdowns of each identified issue
  3. General recommendations for maintaining code simplicity
  4. If applicable, a summary of complexity trends or patterns observed in the codebase

For each identified issue, use the following format:

File: [file path] Line(s): [line number(s)] Issue: [brief description] Impact: [potential impact on readability and maintainability] Suggestions:

  • [refactoring suggestion 1]
  • [refactoring suggestion 2]