[M] Change in dart/sdk[main]: Update the prefer-initializing-formals lint for primary constructors

0 views
Skip to first unread message

Brian Wilkerson (Gerrit)

unread,
4:02 PM (5 hours ago) 4:02 PM
to Brian Wilkerson, Samuel Rawlins, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Samuel Rawlins

Brian Wilkerson voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Samuel Rawlins
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iccc410cc4036c299d0cb000f1d1642ddef63e98a
Gerrit-Change-Number: 491703
Gerrit-PatchSet: 1
Gerrit-Owner: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 20:02:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Samuel Rawlins (Gerrit)

unread,
4:24 PM (4 hours ago) 4:24 PM
to Brian Wilkerson, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson

Samuel Rawlins voted and added 1 comment

Votes added by Samuel Rawlins

Code-Review+1

1 comment

File pkg/linter/test/rule_test_support.dart
Line 32, Patchset 2 (Latest): Future<void> assertDiagnosticsFromMarkdown(String content) {
Samuel Rawlins . unresolved

It would be nice to have a doc comment explaining the markdown syntax.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iccc410cc4036c299d0cb000f1d1642ddef63e98a
Gerrit-Change-Number: 491703
Gerrit-PatchSet: 2
Gerrit-Owner: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 20:24:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
5:15 PM (3 hours ago) 5:15 PM
to Brian Wilkerson, Samuel Rawlins, Commit Queue, dart-analys...@google.com, rev...@dartlang.org

Brian Wilkerson voted and added 1 comment

Votes added by Brian Wilkerson

Commit-Queue+2

1 comment

File pkg/linter/test/rule_test_support.dart
Line 32, Patchset 2: Future<void> assertDiagnosticsFromMarkdown(String content) {
Samuel Rawlins . resolved

It would be nice to have a doc comment explaining the markdown syntax.

Brian Wilkerson

I mean, who documents test code. :-/

Seriously, though, I added a comment pointing to the documentation of the markdown syntax.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iccc410cc4036c299d0cb000f1d1642ddef63e98a
Gerrit-Change-Number: 491703
Gerrit-PatchSet: 3
Gerrit-Owner: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 21:15:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Samuel Rawlins <sraw...@google.com>
satisfied_requirement
open
diffy

Samuel Rawlins (Gerrit)

unread,
5:18 PM (3 hours ago) 5:18 PM
to Brian Wilkerson, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson

Samuel Rawlins voted and added 1 comment

Votes added by Samuel Rawlins

Code-Review+1

1 comment

File pkg/linter/test/rule_test_support.dart
Line 32, Patchset 2: Future<void> assertDiagnosticsFromMarkdown(String content) {
Samuel Rawlins . resolved

It would be nice to have a doc comment explaining the markdown syntax.

Brian Wilkerson

I mean, who documents test code. :-/

Seriously, though, I added a comment pointing to the documentation of the markdown syntax.

Samuel Rawlins

Haha, perfect. I figured there was existing documentation somewhere. Thanks for putting the pointer in there.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iccc410cc4036c299d0cb000f1d1642ddef63e98a
Gerrit-Change-Number: 491703
Gerrit-PatchSet: 3
Gerrit-Owner: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 21:18:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
Comment-In-Reply-To: Samuel Rawlins <sraw...@google.com>
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
5:53 PM (3 hours ago) 5:53 PM
to Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org

Commit Queue submitted the change

Change information

Commit message:
Update the prefer-initializing-formals lint for primary constructors

I got tired of trying to compute diagnostic locations, so I also added
a utility method that will use our standard markdown format. I tried
just modifying the existing `assertDiagnostics` method, but there are
a few tests that include text that `TestCode` parses as markdown.

Closes https://github.com/dart-lang/sdk/issues/62023
Change-Id: Iccc410cc4036c299d0cb000f1d1642ddef63e98a
Commit-Queue: Brian Wilkerson <brianwi...@google.com>
Reviewed-by: Samuel Rawlins <sraw...@google.com>
Files:
  • M pkg/linter/lib/src/rules/prefer_initializing_formals.dart
  • M pkg/linter/test/rule_test_support.dart
  • M pkg/linter/test/rules/prefer_initializing_formals_test.dart
Change size: M
Delta: 3 files changed, 123 insertions(+), 20 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Samuel Rawlins
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iccc410cc4036c299d0cb000f1d1642ddef63e98a
Gerrit-Change-Number: 491703
Gerrit-PatchSet: 4
Gerrit-Owner: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages