mirror of https://github.com/apache/lucene.git
add level=none option so we can find more broken html in solr javadocs
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1383047 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fab19135fd
commit
a4ea891571
|
@ -302,8 +302,8 @@ def checkPackageSummaries(root, level='class'):
|
||||||
True if there are problems.
|
True if there are problems.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if level != 'class' and level != 'package' and level != 'method':
|
if level != 'class' and level != 'package' and level != 'method' and level != 'none':
|
||||||
print('unsupported level: %s, must be "class" or "package" or "method"' % level)
|
print('unsupported level: %s, must be "class" or "package" or "method" or "none"' % level)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
#for dirPath, dirNames, fileNames in os.walk('%s/lucene/build/docs/api' % root):
|
#for dirPath, dirNames, fileNames in os.walk('%s/lucene/build/docs/api' % root):
|
||||||
|
@ -329,7 +329,7 @@ def checkPackageSummaries(root, level='class'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if 'package-summary.html' in fileNames:
|
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
|
anyMissing = True
|
||||||
for fileName in fileNames:
|
for fileName in fileNames:
|
||||||
fullPath = '%s/%s' % (dirPath, fileName)
|
fullPath = '%s/%s' % (dirPath, fileName)
|
||||||
|
@ -342,14 +342,14 @@ def checkPackageSummaries(root, level='class'):
|
||||||
anyMissing = True
|
anyMissing = True
|
||||||
|
|
||||||
if 'overview-summary.html' in fileNames:
|
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
|
anyMissing = True
|
||||||
|
|
||||||
return anyMissing
|
return anyMissing
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if len(sys.argv) < 2 or len(sys.argv) > 3:
|
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)
|
sys.exit(1)
|
||||||
if len(sys.argv) == 2:
|
if len(sys.argv) == 2:
|
||||||
level = 'class'
|
level = 'class'
|
||||||
|
|
|
@ -551,6 +551,8 @@
|
||||||
<!-- TODO: also integrate checkJavaDocs.py, which does more checks -->
|
<!-- TODO: also integrate checkJavaDocs.py, which does more checks -->
|
||||||
<target name="javadocs-lint" depends="javadocs">
|
<target name="javadocs-lint" depends="javadocs">
|
||||||
<check-broken-links dir="build/docs"/>
|
<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>
|
</target>
|
||||||
|
|
||||||
<!-- install-maven-tasks is *not* a useless dependency. do not remove -->
|
<!-- install-maven-tasks is *not* a useless dependency. do not remove -->
|
||||||
|
|
Loading…
Reference in New Issue