q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=73444173066a224f40705fcfc62bca1d960d38f2

commit 73444173066a224f40705fcfc62bca1d960d38f2
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Thu May 19 16:57:12 2016 +0100

    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.
---
 src/lib/eolian/eo_parser.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

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);

-- 


Reply via email to