commit | fa5435b98750c5b97539dbaa6f12465b50ce1c53 | [log] [tgz] |
---|---|---|
author | pq <pquitslund@google.com> | Tue Oct 01 04:31:49 2024 +0000 |
committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Oct 01 04:31:49 2024 +0000 |
tree | 1048df552aac234bc365866cd781d720db142adb | |
parent | 480756dad3bcf2b07c0702083ad446e2aa1763fc [diff] |
[element model] migrate `lines_longer_than_80_chars` Bug: https://github.com/dart-lang/linter/issues/5099 Change-Id: I55abada2367bf5416605b7394cfec9d105c30371 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387611 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Auto-Submit: Phil Quitslund <pquitslund@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/linter/lib/src/rules/lines_longer_than_80_chars.dart b/pkg/linter/lib/src/rules/lines_longer_than_80_chars.dart index 5e30073..66e72be 100644 --- a/pkg/linter/lib/src/rules/lines_longer_than_80_chars.dart +++ b/pkg/linter/lib/src/rules/lines_longer_than_80_chars.dart
@@ -168,7 +168,7 @@ end = lineInfo.getOffsetOfLine(i + 1) - 1; var length = end - start; if (length > 80) { - var content = node.declaredElement?.source.contents.data; + var content = node.declaredFragment?.source.contents.data; if (content != null && content[end] == _lf && content[end - 1] == _cr) {