Apache Lucene open-source search software
add level=none option so we can find more broken html in solr javadocs
Robert Muira4ea89157165
diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.pyindex 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'):continueif '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 = Truefor fileName in fileNames:fullPath = '%s/%s' % (dirPath, fileName)@@ -342,14 +342,14 @@ def checkPackageSummaries(root, level='class'):anyMissing = Trueif 'overview-summary.html' in fileNames:- if checkSummary('%s/overview-summary.html' % dirPath):+ if level != 'none' and checkSummary('%s/overview-summary.html' % dirPath):anyMissing = Truereturn anyMissingif __name__ == '__main__':if len(sys.argv) < 2 or len(sys.argv) > 3:- print('usage: %s <dir> [class|package|method]' % sys.argv[0])+ print('usage: %s <dir> [none|package|class|method]' % sys.argv[0])sys.exit(1)if len(sys.argv) == 2:level = 'class'diff --git a/solr/build.xml b/solr/build.xmlindex 1f939b4d1a1..29953ff1b18 100644--- a/solr/build.xml+++ b/solr/build.xml@@ -551,6 +551,8 @@<!-- TODO: also integrate checkJavaDocs.py, which does more checks --><target name="javadocs-lint" depends="javadocs"><check-broken-links dir="build/docs"/>+ <!-- TODO: add missing package.htmls and bump this to level=package -->+ <!-- <check-missing-javadocs dir="build/docs" level="none"/> --></target><!-- install-maven-tasks is *not* a useless dependency. do not remove -->