From 2ecceef5cfff193a0d1168234cad6190f6020a3e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Aug 2016 09:37:59 -0700 Subject: Cleaned up output format --- tools/distrib/c-ish/check_documentation.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/distrib/c-ish/check_documentation.py b/tools/distrib/c-ish/check_documentation.py index ea92e0099b..0bb3ca6961 100755 --- a/tools/distrib/c-ish/check_documentation.py +++ b/tools/distrib/c-ish/check_documentation.py @@ -60,11 +60,20 @@ os.chdir(_ROOT) 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 @@ -72,7 +81,11 @@ for target_dir in _TARGET_DIRS: 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 -- cgit v1.2.3