Skip to content

Commit

Permalink
Cleaned up output format
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Aug 25, 2016
1 parent d34ad4b commit 2ecceef
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tools/distrib/c-ish/check_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,32 @@
errors = 0

# walk directories, find things
printed_banner = False
for target_dir in _TARGET_DIRS:
for root, dirs, filenames in os.walk(target_dir):
if 'README.md' not in filenames:
print '%s: missing README.md' % root
if not printed_banner:
print 'Missing README.md'
print '================='
printed_banner = True
print root
errors += 1
if printed_banner: print
printed_banner = False
for target_dir in _TARGET_DIRS:
for root, dirs, filenames in os.walk(target_dir):
for filename in filenames:
if os.path.splitext(filename)[1] not in _INTERESTING_EXTENSIONS:
continue
path = os.path.join(root, filename)
with open(path) as f:
contents = f.read()
if '\\file' not in contents:
print '%s: no \\file comment' % path
if not printed_banner:
print 'Missing \\file comment'
print '======================'
printed_banner = True
print path
errors += 1

assert errors == 0, 'error count = %d' % errors

0 comments on commit 2ecceef

Please sign in to comment.