From ae5a087657a691fc52a3c8a4070930eac812d64b Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 22 Jun 2015 22:26:00 -0700 Subject: [PATCH] warn when we encounter an undocumented library --- lib/markdown_processor.dart | 2 +- lib/src/html_generator.dart | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/markdown_processor.dart b/lib/markdown_processor.dart index 2fafea2f15..cd413881d8 100644 --- a/lib/markdown_processor.dart +++ b/lib/markdown_processor.dart @@ -172,7 +172,7 @@ String _replaceAllLinks(ModelElement element, String str, if (link != null) { buf.write('$codeRef'); } else { - print("WARNING: $element contains unknown doc reference [$codeRef]"); + print(" warning: unresolved doc reference '$codeRef' (in $element)"); buf.write(codeRef); } } diff --git a/lib/src/html_generator.dart b/lib/src/html_generator.dart index e66b925688..cb2c41ffe0 100644 --- a/lib/src/html_generator.dart +++ b/lib/src/html_generator.dart @@ -222,8 +222,13 @@ class HtmlGeneratorInstance { void generateLibrary(Package package, Library lib) { print('generating docs for library ${lib.path}...'); - // TODO should we add _this_ to the context and avoid putting stuff - // in the map? + if (!lib.hasDocumentation) { + print( + " warning: library '${lib.name}' has no documentation; consider adding some"); + } + + // TODO: Should we add _this_ to the context and avoid putting stuff in the + // map? Map data = { 'package': package, 'library': lib,