Skip to content

Conversation

@ulrichstark
Copy link
Contributor

Split check_method_definition by method kind into check_method_definition_accessor, check_method_definition_constructor and check_method_definition_method and keep common logic in check_method_definition. This avoids unnecessary checks and makes the logic easier to read.

Copilot AI review requested due to automatic review settings October 5, 2025 17:23
@github-actions github-actions bot added A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Oct 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the check_method_definition method by splitting it into three specialized functions based on method kind: accessors, constructors, and regular methods. This improves code organization by avoiding unnecessary checks and makes the validation logic more readable.

  • Split check_method_definition into kind-specific functions while preserving common validation logic
  • Updated call sites to use the appropriate specialized method based on context
  • Reorganized abstract method validation to be specific to each method type

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 5, 2025

CodSpeed Instrumentation Performance Report

Merging #14364 will not alter performance

Comparing ulrichstark:split-check_method_definition-by-method-kind (58908b4) with main (4a5249f)

Summary

✅ 37 untouched

@Boshen Boshen merged commit feca94e into oxc-project:main Oct 6, 2025
27 checks passed
@ulrichstark ulrichstark deleted the split-`check_method_definition`-by-method-kind branch October 6, 2025 12:43
@Boshen Boshen mentioned this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants