Skip to content

Commit 94026a6

Browse files
authored
add additional lints for the dartdoc codebase (#1374)
1 parent 4c3c096 commit 94026a6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.analysis_options renamed to analysis_options.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ analyzer:
1010
linter:
1111
rules:
1212
- annotate_overrides
13+
- avoid_init_to_null
14+
- directives_ordering
15+
- no_adjacent_strings_in_list
16+
- package_api_docs
17+
- slash_for_doc_comments
18+
# - unnecessary_brace_in_string_interps

lib/src/model.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2773,7 +2773,7 @@ class Package implements Nameable, Documentable {
27732773
if (_elementToLibrary.containsKey(element)) {
27742774
return _elementToLibrary[element];
27752775
}
2776-
Library foundLibrary = null;
2776+
Library foundLibrary;
27772777
if (libraryElementReexportedBy.containsKey(element.library)) {
27782778
Set<Library> exportedIn = libraryElementReexportedBy[element.library];
27792779
foundLibrary = exportedIn.firstWhere(

test/compare_output_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ void main() {
112112

113113
message.addAll([
114114
'',
115-
"If there have been changes to generation"
116-
" you may need to run `grind update-test-package-docs` again."
115+
'If there have been changes to generation you may need to run `grind update-test-package-docs` again.'
117116
]);
118117

119118
fail(message.join('\n'));

0 commit comments

Comments
 (0)