added documentations to headers
This commit is contained in:
@@ -113,6 +113,15 @@ def categorize_symbol(name, filename):
|
||||
|
||||
return 'Core'
|
||||
|
||||
def suppress_warning(filename, name):
|
||||
f = os.path.split(filename)[1]
|
||||
if f != 'alert_types.hpp': return False
|
||||
|
||||
# if name.endswith('_alert') or name == 'message()':
|
||||
return True
|
||||
|
||||
# return False
|
||||
|
||||
def first_item(itr):
|
||||
for i in itr:
|
||||
return i
|
||||
@@ -285,6 +294,8 @@ def parse_class(lno, lines, filename):
|
||||
funs[-1]['names'].update(current_fun['names'])
|
||||
else:
|
||||
current_fun['desc'] = context
|
||||
if context == '' and not suppress_warning(filename, first_item(current_fun['names'])):
|
||||
print 'WARNING: member function "%s" is not documented' % (name + '::' + first_item(current_fun['names']))
|
||||
funs.append(current_fun)
|
||||
context = ''
|
||||
blanks = 0
|
||||
@@ -299,6 +310,8 @@ def parse_class(lno, lines, filename):
|
||||
fields[-1]['names'].append(n)
|
||||
fields[-1]['signatures'].append(l)
|
||||
else:
|
||||
if context == '' and not suppress_warning(filename, n):
|
||||
print 'WARNING: field "%s" is not documented' % (name + '::' + n)
|
||||
fields.append({'signatures': [l], 'names': [n], 'desc': context})
|
||||
context = ''
|
||||
blanks = 0
|
||||
@@ -308,6 +321,8 @@ def parse_class(lno, lines, filename):
|
||||
enum, lno = parse_enum(lno - 1, lines, filename)
|
||||
if enum != None and is_visible(context):
|
||||
enum['desc'] = context
|
||||
if context == '' and not suppress_warning(filename, enum['name']):
|
||||
print 'WARNING: enum "%s" is not documented' % (name + '::' + enum['name'])
|
||||
enums.append(enum)
|
||||
context = ''
|
||||
continue
|
||||
@@ -510,6 +525,7 @@ for filename in files:
|
||||
current_class, lno = parse_class(lno -1, lines, filename)
|
||||
if current_class != None and is_visible(context):
|
||||
current_class['desc'] = context
|
||||
if context == '': print 'WARNING: class "%s" is not documented' % (current_class['name'])
|
||||
classes.append(current_class)
|
||||
context = ''
|
||||
blanks += 1
|
||||
@@ -523,6 +539,7 @@ for filename in files:
|
||||
functions[-1]['names'].update(current_fun['names'])
|
||||
else:
|
||||
current_fun['desc'] = context
|
||||
if context == '': print 'WARNING: function "%s" is not documented' % (first_item(current_fun['names']))
|
||||
functions.append(current_fun)
|
||||
blanks = 0
|
||||
context = ''
|
||||
@@ -538,6 +555,7 @@ for filename in files:
|
||||
current_enum, lno = parse_enum(lno - 1, lines, filename)
|
||||
if current_enum != None and is_visible(context):
|
||||
current_enum['desc'] = context
|
||||
if context == '': print 'WARNING: enum "%s" is not documented' % (current_enum['name'])
|
||||
enums.append(current_enum)
|
||||
context = ''
|
||||
blanks += 1
|
||||
|
Reference in New Issue
Block a user