From: Daniel Kolesa Date: Thu, 19 May 2016 15:57:12 +0000 (+0100) Subject: eolian: enable incorrect property doc warnings with env var X-Git-Tag: upstream/1.20.0~6242 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73444173066a224f40705fcfc62bca1d960d38f2;p=platform%2Fupstream%2Fefl.git eolian: enable incorrect property doc warnings with env var This adds env var EOLIAN_PROPERTY_DOC_WARN which enables extra warnings for properties that don't have a general doc but have getter/setter doc. This will eventually become an error and will be enabled by default. For now it's too verbose. --- diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 203821e..c945696 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -1114,6 +1114,16 @@ parse_accessor(Eo_Lexer *ls, Eolian_Function *prop) line = ls->line_number; col = ls->column; check_next(ls, '{'); + if ((ls->t.token == TOK_DOC) && !prop->common_doc) + { + if (getenv("EOLIAN_PROPERTY_DOC_WARN")) + { + fprintf(stderr, "eolian:%s:%d:%d: %s doc without property " + "doc for '%s.%s'\n", + prop->base.file, line, col, is_get ? "getter" : "setter", + ls->tmp.kls->full_name, prop->name); + } + } if (is_get) { FILL_DOC(ls, prop, get_doc);