Skip to content

removing deprecated apis and setting enableExtraction:true#44

Merged
itaymendel merged 2 commits intomainfrom
refactor/breaking-changes-2-0
Feb 17, 2026
Merged

removing deprecated apis and setting enableExtraction:true#44
itaymendel merged 2 commits intomainfrom
refactor/breaking-changes-2-0

Conversation

@itaymendel
Copy link
Owner

@itaymendel itaymendel commented Feb 17, 2026

Summary by CodeRabbit

  • Breaking Changes

    • Extraction suggestions are enabled by default; disable with enableExtraction: false
  • Removed

    • Deprecated complexity/max-cyclomatic and complexity/max-cognitive rules; use complexity/complexity instead
  • New Features

    • Public API now exposes createCombinedComplexityVisitor and CombinedComplexityResult

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

This PR removes the deprecated max-cyclomatic and max-cognitive rules, consolidates complexity checks into a single combined complexity visitor, adds public exports createCombinedComplexityVisitor and CombinedComplexityResult, and flips the default for extraction suggestions to enabled (enableExtraction: true).

Changes

Cohort / File(s) Summary
Deprecated rule removals
src/rules/max-cyclomatic.ts, src/rules/max-cognitive.ts
Deleted the two separate complexity rule implementations and their exports.
Combined complexity API
src/combined-visitor.ts, src/rules/complexity.ts
Introduced unified complexity visitor and result type used to replace separate rules.
Public surface & exports
src/index.ts
Removed imports/exports for deprecated rules; added exports for createCombinedComplexityVisitor and CombinedComplexityResult; updated public docs/comments.
Shared rule utilities
src/rules/shared.ts
Removed ComplexityRuleConfig and createComplexityRule factory and warnDeprecated; changed default enableExtraction to true in extraction parsing.
Docs & changelog
README.md, CHANGELOG.md
Updated docs to show extraction enabled by default, migration guidance to the combined rule, and removed references to v1.0-specific narrative.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • Chore/prep for v1 #37 — Directly related: similar consolidation to a combined complexity visitor and removal of per-metric rules.

Poem

🐇 I hopped through code both old and new,

Cyclomatic and Cognitive bid adieu,
One visitor now counts every part,
Extraction on by default — a clever art,
Tiny paws, big refactor — hooray! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly reflects the two main changes: removal of deprecated APIs (max-cyclomatic and max-cognitive rules) and enabling extraction by default (enableExtraction:true).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/breaking-changes-2-0

Comment @coderabbitai help to get the list of available commands and usage tips.

@itaymendel itaymendel merged commit 5461168 into main Feb 17, 2026
2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Mar 4, 2026
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