]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: warn about too much docstring
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 5 Jul 2017 17:20:21 +0000 (13:20 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 5 Jul 2017 18:30:16 +0000 (14:30 -0400)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/command_parse.y

index 3337481094b6b40e3811a5beddf60fde547576d8..ba042c33be9c97c4a887ebdc16ed55ba258a842b 100644 (file)
@@ -443,6 +443,14 @@ terminate_graph (CMD_YYLTYPE *locp, struct parser_ctx *ctx,
   struct graph_node *end_element_node =
     graph_new_node (ctx->graph, element, NULL);
 
+  if (ctx->docstr && strlen (ctx->docstr) > 1) {
+    zlog_debug ("Excessive docstring while parsing '%s'", ctx->el->string);
+    zlog_debug ("----------");
+    while (ctx->docstr && ctx->docstr[1] != '\0')
+      zlog_debug ("%s", strsep(&ctx->docstr, "\n"));
+    zlog_debug ("----------\n");
+  }
+
   graph_add_edge (finalnode, end_token_node);
   graph_add_edge (end_token_node, end_element_node);
 }