Fix javadocs-linter: Windows support, support for file:-URLs (now needed), fix broken XML-comments in some files

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1366220 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-07-26 22:45:31 +00:00
parent dfbd640344
commit 92e5c35bc3
6 changed files with 11 additions and 15 deletions

View File

@ -65,7 +65,7 @@ class FindHyperlinks(HTMLParser):
href = href.strip()
self.links.append(urlparse.urljoin(self.baseURL, href))
else:
if self.baseURL.endswith(os.path.sep + 'AttributeSource.html'):
if self.baseURL.endswith('/AttributeSource.html'):
# LUCENE-4010: AttributeSource's javadocs has an unescaped <A> generics!! Seems to be a javadocs bug... (fixed in Java 7)
pass
else:
@ -126,7 +126,7 @@ def checkAll(dirName):
main not in ('deprecated-list',):
# Somehow even w/ java 7 generaged javadocs,
# deprecated-list.html can fail to escape generics types
fullPath = os.path.join(root, f)
fullPath = os.path.join(root, f).replace(os.path.sep,'/')
#print ' %s' % fullPath
allFiles[fullPath] = parse(fullPath, open('%s/%s' % (root, f), encoding='UTF-8').read())
@ -194,8 +194,13 @@ def checkAll(dirName):
# on annotations it seems?
pass
elif link.startswith('file:'):
# TODO: fix file: paths (need to parse URL, unescape %XX and so on)
pass
filepath = urlparse.unquote(urlparse.urlparse(link).path)
if not (os.path.exists(filepath) or os.path.exists(filepath[1:])):
if not printed:
printed = True
print()
print(fullPath)
print(' BROKEN LINK: %s' % link)
elif link not in allFiles:
# We only load HTML... so if the link is another resource (eg
# SweetSpotSimilarity refs

View File

@ -239,7 +239,7 @@
<target name="javadocs" description="Generate javadoc" depends="javadocs-lucene-core, javadocs-modules, javadocs-test-framework"/>
<!-- we check for broken links across all documentation -->
<target name="javadocs-lint" depends="documentation">
<target name="javadocs-lint" >
<sequential>
<check-broken-links dir="build/docs"/>
<!-- TODO: change this level=class -->

View File

@ -19,7 +19,6 @@
<title>Faceted Indexing and Search</title>
</head>
<body>
<!-- NOTE: if you update the userguide link, also update the one in src/java/overview.html -->
Provides faceted indexing and search capabilities. The <a href="doc-files/userguide.html">userguide</a> is recommended for a start.
</body>
</html>

View File

@ -20,15 +20,8 @@
</head>
<body>
<h1>Results of Faceted Search</h1>
<!--
<p>
The results of facets accumulation are obtained as a list of {@link org.apache.lucene.facet.search.results.FacetResult} elements.
See two API calls for obtaining these results:
<ul>
<li></li>
</ul>
</p>
-->
</body>
</html>

View File

@ -21,7 +21,6 @@
</title>
</head>
<body>
<!-- NOTE: if you update the userguide link, also update the one in o.a.l.facet/package.html -->
Provides faceted indexing and search capabilities (checkout the <a href="org/apache/lucene/facet/doc-files/userguide.html">userguide</a>).
</body>
</html>

View File

@ -54,7 +54,7 @@ public class FileUtils {
}
/**
* Copied from Lucene's FSDirectory.fsync(String) <!-- protected -->
* Copied from Lucene's FSDirectory.fsync(String)
*
* @param fullFile the File to be synced to disk
* @throws IOException if the file could not be synced