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

Commit

Permalink
fix: avoid null check exception in the analyzer (#1099)
Browse files Browse the repository at this point in the history
* fix: try to avoid null check exception

* chore: update changelog
  • Loading branch information
incendial authored Dec 8, 2022
1 parent e6c6d86 commit 8b2b4f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 8b2b4f3

Please sign in to comment.