Skip to content

feat: add duplicate code detection - #13

Merged
Azaucifer merged 1 commit into
mainfrom
feature/duplicate-detection
Sep 7, 2026
Merged

feat: add duplicate code detection#13
Azaucifer merged 1 commit into
mainfrom
feature/duplicate-detection

Conversation

@Azaucifer

Copy link
Copy Markdown
Owner

Description

Adds structural duplicate-function detection to the codebase health analyzer using Python AST normalization.

Changes

  • Detects structurally identical functions across Python files
  • Normalizes function names and arguments before comparison
  • Skips files containing syntax errors
  • Displays duplicate function groups in the terminal report
  • Includes duplicate function groups in JSON reports
  • Adds unit and integration tests for duplicate detection

Testing

  • 61 tests passing
  • Duplicate functions tested
  • Non-duplicate functions tested
  • Syntax-error handling tested
  • JSON report integration tested

Example

The analyzer can identify functions such as:

  • add(a, b)
  • calculate(x, y)

as duplicates when their underlying structure is identical.

@Azaucifer
Azaucifer merged commit f88703a into main Sep 7, 2026
5 checks passed
@Azaucifer
Azaucifer deleted the feature/duplicate-detection branch September 7, 2026 10:22
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.

1 participant