Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

fix: avoid null check exception in the analyzer #1099

Merged
merged 2 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 5.2.1

* fix: avoid null check exception in the analyzer.

## 5.2.0

* fix: remove recursive traversal for [`ban-name`](https://dartcodemetrics.dev/docs/rules/common/ban-name) rule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ class UsedCodeVisitor extends RecursiveAstVisitor<void> {
}

bool _recordConditionalElement(Element element) {
final elementPath = element.source?.fullName;
// ignore: deprecated_member_use
final elementPath = element.enclosingElement3?.source?.fullName;
if (elementPath == null) {
return false;
}
Expand Down