diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-07-05 19:20:21 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-07-05 20:30:16 +0200 |
commit | ebb0813089c7bcc8e23b7921a77dc5b2d0d02709 (patch) | |
tree | b6fc54264b87b368e9ab1cf97e06896981671fa1 /lib/command_parse.y | |
parent | Merge pull request #742 from qlyoung/hashstats (diff) | |
download | frr-ebb0813089c7bcc8e23b7921a77dc5b2d0d02709.tar.xz frr-ebb0813089c7bcc8e23b7921a77dc5b2d0d02709.zip |
lib: warn about too much docstring
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_parse.y')
-rw-r--r-- | lib/command_parse.y | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/command_parse.y b/lib/command_parse.y index 333748109..ba042c33b 100644 --- a/lib/command_parse.y +++ b/lib/command_parse.y @@ -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); } |