Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

improve error reporting when this tool finds javadocs problems

Michael McCandless73ec0f28cc91
diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py
index 4089a8f15b5..b8a65990912 100644
--- a/dev-tools/scripts/checkJavaDocs.py
+++ b/dev-tools/scripts/checkJavaDocs.py
@@ -161,9 +161,11 @@ def checkClassSummaries(fullPath):
foundMethodDetail = False
lastMethodAnchor = None
+ lineCount = 0
for line in f.readlines():
m = reMethodDetail.search(line)
+ lineCount += 1
if m is not None:
foundMethodDetail = True
continue
@@ -212,6 +214,8 @@ def checkClassSummaries(fullPath):
if inThing:
if lineLower.find('</tr>') != -1:
if not hasDesc:
+ if lastItem is None:
+ raise RuntimeError('failed to locate javadoc item in %s, line %d? last line: %s' % (fullPath, lineCount, line.rstrip()))
missing.append((lastCaption, unEscapeURL(lastItem)))
inThing = False
continue