mirror of https://github.com/apache/lucene.git
LUCENE-9213: fix documentation-lint (and finally precommit) to work on java 12 and 13
the "missing javadocs" checker needed tweaks to work with the format changes of java 13. As a followup we may investigate javadoc (maybe the new doclet api). It has its own missing checks too now, but they are black vs white (either fully documented or not checked), whereas this python tool allows us to "improve", e.g. enforce that all classes have doc, even if all methods do not yet.
This commit is contained in:
parent
206a70e7b7
commit
69f26d099e
|
@ -22,7 +22,7 @@ reHREF = re.compile('<a.*?>(.*?)</a>', re.IGNORECASE)
|
|||
reMarkup = re.compile('<.*?>')
|
||||
reDivBlock = re.compile('<div class="block">(.*?)</div>', re.IGNORECASE)
|
||||
reCaption = re.compile('<caption><span>(.*?)</span>', re.IGNORECASE)
|
||||
reJ8Caption = re.compile('<h3>(.*?) Summary</h3>')
|
||||
reJ8Caption = re.compile('<h[23]>(.*?) Summary</h[23]>')
|
||||
reTDLastNested = re.compile('^<td class="colLast"><code><strong><a href="[^>]*\.([^>]*?)\.html" title="class in[^>]*">', re.IGNORECASE)
|
||||
reMethod = re.compile('^<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="[^>]*#([^>]*?)">', re.IGNORECASE)
|
||||
reColOne = re.compile('^<td class="colOne"><code><strong><a href="[^>]*#([^>]*?)">', re.IGNORECASE)
|
||||
|
@ -31,8 +31,9 @@ reNestedClassMemberNameLink = re.compile('^<td class="colLast"><code><span class
|
|||
reMemberNameOneLink = re.compile('^<td class="colOne"><code><span class="memberNameLink"><a href="[^>]*#([^>]*?)"', re.IGNORECASE)
|
||||
|
||||
# the Method detail section at the end
|
||||
reMethodDetail = re.compile('^<h3>Method Detail</h3>$', re.IGNORECASE)
|
||||
reMethodDetail = re.compile('^<h[23]>Method Details?</h[23]>$', re.IGNORECASE)
|
||||
reMethodDetailAnchor = re.compile('^(?:</a>)?<a id="([^>]*?)">$', re.IGNORECASE)
|
||||
reJ13MethodDetailAnchor = re.compile('^(?:<h3>|</a>)<a id="([^>]*?)">[^>]*</a></h3>$', re.IGNORECASE)
|
||||
|
||||
reTag = re.compile("(?i)<(\/?\w+)((\s+\w+(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)\/?>")
|
||||
|
||||
|
@ -176,7 +177,7 @@ def checkClassSummaries(fullPath):
|
|||
# they should be specified elsewhere, if they are e.g. jdk or
|
||||
# external classes we cannot inherit their docs anyway
|
||||
if foundMethodDetail:
|
||||
m = reMethodDetailAnchor.search(line)
|
||||
m = reMethodDetailAnchor.search(line) or reJ13MethodDetailAnchor.search(line)
|
||||
if m is not None:
|
||||
lastMethodAnchor = m.group(1)
|
||||
continue
|
||||
|
|
|
@ -332,9 +332,11 @@
|
|||
<contains string="${java.vm.name}" substring="openjdk" casesensitive="false"/>
|
||||
<contains string="${java.vm.name}" substring="jrockit" casesensitive="false"/>
|
||||
</or>
|
||||
<equals arg1="${java.specification.version}" arg2="11"/>
|
||||
<!-- TODO: Fix this! For now only run this on 64bit, because jTIDY OOMs with default heap size: -->
|
||||
<!--<contains string="${os.arch}" substring="64"/>-->
|
||||
<or>
|
||||
<equals arg1="${java.specification.version}" arg2="11"/>
|
||||
<equals arg1="${java.specification.version}" arg2="12"/>
|
||||
<equals arg1="${java.specification.version}" arg2="13"/>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
|
|
Loading…
Reference in New Issue