Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 74e5478

Browse files
committed
Bail early in API analysis if no project is set.
See: dart-lang/sdk#24949 BUG=24949 [email protected] Review URL: https://codereview.chromium.org//1446383002 .
1 parent 83453a4 commit 74e5478

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.1.7
2+
3+
* Fix to `package_api_docs` (dart-lang/sdk#24947; #154).
4+
15
# 0.1.6
26

37
* Fix to `package_prefixed_library_names` (dart-lang/sdk#24947; #154).

lib/src/rules/package_api_docs.dart

+5
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ class Visitor extends GeneralizingAstVisitor {
8888
DartProject get project => rule.project;
8989

9090
void check(Declaration node) {
91+
// If no project info is set, bail early.
92+
// https://github.com/dart-lang/linter/issues/154
93+
if (project == null) {
94+
return;
95+
}
9196
if (project.isApi(node.element)) {
9297
if (node.documentationComment == null) {
9398
rule.reportLint(getNodeToAnnotate(node));

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: linter
2-
version: 0.1.6
2+
version: 0.1.7
33
author: Dart Team <[email protected]>
44
description: Style linter for Dart.
55
homepage: https://github.com/dart-lang/linter

0 commit comments

Comments
 (0)