Skip to content

refactor: update named parameters ordering priority - #339

Closed
solid-illiaaihistov wants to merge 1 commit into
solid-software:masterfrom
solid-illiaaihistov:fix/named-parameters-ordering-default
Closed

refactor: update named parameters ordering priority #339
solid-illiaaihistov wants to merge 1 commit into
solid-software:masterfrom
solid-illiaaihistov:fix/named-parameters-ordering-default

Conversation

@solid-illiaaihistov

@solid-illiaaihistov solid-illiaaihistov commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

I'd like to swap required and super parameters in named_parameters_ordering to avoid a conflict with always_put_required_named_parameters_first

Summary by CodeRabbit

  • Bug Fixes

    • Improved named-parameter ordering checks so required parameters are placed before inherited or superclass parameters.
    • Updated lint guidance for constructors using superclass parameters, producing more accurate warnings for incorrect ordering.
  • Tests

    • Expanded coverage for required, local, and superclass parameter ordering scenarios to ensure consistent lint results.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2840c827-c540-478c-8cd4-bc8e53180eb0

📥 Commits

Reviewing files that changed from the base of the PR and between 06b5d55 and c61f6f8.

📒 Files selected for processing (2)
  • lib/src/lints/named_parameters_ordering/models/parameter_type.dart
  • test/src/lints/named_parameters_ordering/named_parameters_ordering_rule_test.dart

📝 Walkthrough

Walkthrough

The lint now orders required parameters before inherited parameters. Constructor-ordering fixtures reflect the updated handling of super.userId and required this.name.

Changes

Named parameter ordering

Layer / File(s) Summary
Update ordering rule and constructor fixtures
lib/src/lints/named_parameters_ordering/models/parameter_type.dart, test/src/lints/named_parameters_ordering/named_parameters_ordering_rule_test.dart
The default order places required before inherited. Valid and invalid constructor fixtures now reflect the updated ordering.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the update to named parameter ordering priority, which is the main change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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