Skip to content

feat: add code complexity and maintainability analyzer#446

Closed
upasana-2006 wants to merge 1 commit into
imDarshanGK:mainfrom
upasana-2006:add-complexity-analyzer
Closed

feat: add code complexity and maintainability analyzer#446
upasana-2006 wants to merge 1 commit into
imDarshanGK:mainfrom
upasana-2006:add-complexity-analyzer

Conversation

@upasana-2006
Copy link
Copy Markdown

@upasana-2006 upasana-2006 commented May 29, 2026

Description

This PR adds a new Code Complexity & Maintainability Analyzer using Python's AST module.

Features Added

  • Cyclomatic complexity calculation for Python functions
  • Function-level complexity reporting
  • Risk level classification (Low, Medium, High)
  • Maintainability score generation
  • Recommendations for highly complex code
  • Unit tests covering simple functions, branching logic, loops, and invalid syntax

Benefits

  • Helps developers identify refactoring opportunities
  • Improves code quality insights provided by the platform
  • Complements existing code analysis capabilities with maintainability-focused metrics

Related Issue

Fixes #445

Type of change

  • Bug fix
  • New feature / enhancement
  • Documentation update
  • Test addition
  • Refactor

Checklist

  • I have read CONTRIBUTING.md
  • My branch is up to date with main
  • I have run pytest -v and all tests pass
  • I have not introduced duplicate issues or features
  • My PR title follows the format: feat/fix/docs/test: short description
  • I have added tests for new features (Level 2 and 3 issues)
  • No hardcoded secrets or API keys in my code
  • This PR is linked to a GSSoC 2026 issue

Screenshots (if frontend change)

N/A

Test evidence

pytest -v
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Code Complexity Analyzer with Maintainability Score

1 participant