diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 7c9244cc427..c9aabcb68c5 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -302,8 +302,8 @@ def checkPackageSummaries(root, level='class'): True if there are problems. """ - if level != 'class' and level != 'package' and level != 'method': - print('unsupported level: %s, must be "class" or "package" or "method"' % level) + if level != 'class' and level != 'package' and level != 'method' and level != 'none': + print('unsupported level: %s, must be "class" or "package" or "method" or "none"' % level) sys.exit(1) #for dirPath, dirNames, fileNames in os.walk('%s/lucene/build/docs/api' % root): @@ -329,7 +329,7 @@ def checkPackageSummaries(root, level='class'): continue if 'package-summary.html' in fileNames: - if level != 'package' and checkSummary('%s/package-summary.html' % dirPath): + if (level == 'class' or level == 'method') and checkSummary('%s/package-summary.html' % dirPath): anyMissing = True for fileName in fileNames: fullPath = '%s/%s' % (dirPath, fileName) @@ -342,14 +342,14 @@ def checkPackageSummaries(root, level='class'): anyMissing = True if 'overview-summary.html' in fileNames: - if checkSummary('%s/overview-summary.html' % dirPath): + if level != 'none' and checkSummary('%s/overview-summary.html' % dirPath): anyMissing = True return anyMissing if __name__ == '__main__': if len(sys.argv) < 2 or len(sys.argv) > 3: - print('usage: %s