Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[unreachable_from_main] Support for instance members. #4441

Merged

Conversation

scheglov
Copy link
Contributor

@scheglov scheglov commented Jun 8, 2023

When applied to analyzer/, analysis_server, etc found a handful of violations.
https://dart-review.googlesource.com/c/sdk/+/307975

@coveralls
Copy link

Coverage Status

coverage: 96.713% (+0.01%) from 96.701% when pulling 4fe01f3 on scheglov:unreachable_from_main-instanceMembers into e1fda27 on dart-lang:main.

@pq pq requested a review from srawlins June 8, 2023 13:30
@@ -181,6 +229,16 @@ class _ReferenceVisitor extends RecursiveAstVisitor {
super.visitClassDeclaration(node);
}

@override
visitConstantPattern(ConstantPattern node) {
_patternLevel++;
Copy link
Member

Choose a reason for hiding this comment

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

Nice impl

Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

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

The testing looks pretty complete! I'd love to test this in our packages.

@scheglov scheglov merged commit 7ba900d into dart-lang:main Jun 9, 2023
@scheglov scheglov deleted the unreachable_from_main-instanceMembers branch June 9, 2023 16:53
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jun 9, 2023
dart-lang/linter#4441

Change-Id: I55afa6b7d78bc1114ce97c1b5bebcf7a8bca5b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307975
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
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.

3 participants