-
Notifications
You must be signed in to change notification settings - Fork 13
[XERCESJ-1781] fine tuning Javadoc linting #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ Authors: | |
|
|
||
| ==================================================================== --> | ||
| <project default="usage" basedir="."> | ||
|
|
||
| <!-- Xerces Java directories --> | ||
| <property name="build.dir" value="./build"/> | ||
| <property name="data.dir" value="./data"/> | ||
|
|
@@ -179,10 +179,10 @@ Authors: | |
|
|
||
| <copy file="${src.dir}/org/apache/xerces/jaxp/javax.xml.parsers.SAXParserFactory" | ||
| tofile="${build.dest}/META-INF/services/javax.xml.parsers.SAXParserFactory"/> | ||
|
|
||
| <copy file="${src.dir}/org/apache/xerces/jaxp/datatype/javax.xml.datatype.DatatypeFactory" | ||
| tofile="${build.dest}/META-INF/services/javax.xml.datatype.DatatypeFactory"/> | ||
|
|
||
| <copy file="${src.dir}/org/apache/xerces/jaxp/validation/javax.xml.validation.SchemaFactory" | ||
| tofile="${build.dest}/META-INF/services/javax.xml.validation.SchemaFactory"/> | ||
|
|
||
|
|
@@ -198,11 +198,11 @@ Authors: | |
| <!-- Prepares the source code --> | ||
| <!-- =================================================================== --> | ||
| <target name="prepare-src" depends="prepare-common"> | ||
| <!-- Do not include this file in xercesImpl.jar. It prevents applications further down the | ||
| classpath from overriding the parser's default and may also cause an incompatible mix | ||
| of classes to be loaded leading to a failure such as a NoSuchMethodError. --> | ||
| <!-- <copy file="${src.dir}/org/apache/xerces/parsers/org.apache.xerces.xni.parser.XMLParserConfiguration" | ||
| <!-- Do not include this file in xercesImpl.jar. It prevents applications further down the | ||
| classpath from overriding the parser's default and may also cause an incompatible mix | ||
| of classes to be loaded leading to a failure such as a NoSuchMethodError. --> | ||
| <!-- <copy file="${src.dir}/org/apache/xerces/parsers/org.apache.xerces.xni.parser.XMLParserConfiguration" | ||
| tofile="${build.dest}/META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration"/> --> | ||
|
|
||
| <copy file="${src.dir}/org/apache/xerces/dom/org.w3c.dom.DOMImplementationSourceList" | ||
|
|
@@ -220,7 +220,7 @@ Authors: | |
| javax.xml.parsers.ConvertToURI.java"> | ||
| </fileset> | ||
| </copy> | ||
|
|
||
| <!-- create English message bundles from the default ones --> | ||
| <copy file="${src.dir}/org/apache/xerces/impl/msg/DatatypeMessages.properties" | ||
| tofile="${build.src}/org/apache/xerces/impl/msg/DatatypeMessages_en.properties"/> | ||
|
|
@@ -494,29 +494,29 @@ Authors: | |
| <replace token="@xerces.internal" dir="${build.src}"> | ||
| <replacevalue><![CDATA[<dl><dt><strong>INTERNAL:</strong></dt><dd>Usage of this class is not supported. It may be altered or removed at any time.</dd></dl>]]></replacevalue> | ||
| </replace> | ||
|
|
||
| <replace token="@xerces.experimental" dir="${build.src}"> | ||
| <replacevalue><![CDATA[<dl><dt><strong>EXPERIMENTAL:</strong></dt><dd>This class should not be considered stable. It is likely to be altered or replaced in the future.</dd></dl>]]></replacevalue> | ||
| </replace> | ||
| </target> | ||
|
|
||
| <!-- =================================================================== --> | ||
| <!-- Creates the API documentation --> | ||
| <!-- =================================================================== --> | ||
| <target name="javadocs" depends="prepare-src"> | ||
| <target name="javadocs" depends="prepare-src"> | ||
|
|
||
| <condition property="additional.param" value=" -taglet org.apache.xerces.util.ExperimentalTaglet -taglet org.apache.xerces.util.InternalTaglet -tagletpath ${tools.dir}/bin/xerces2taglets.jar"> | ||
| <available classname="com.sun.tools.doclets.Taglet"/> | ||
| </condition> | ||
|
|
||
| <antcall target="javadoc-replace" /> | ||
|
|
||
| <condition property="additional.param" value=""> | ||
| <not> | ||
| <available classname="com.sun.tools.doclets.Taglet"/> | ||
| </not> | ||
| </condition> | ||
|
|
||
| <mkdir dir='${build.dir}/docs/javadocs/api'/> | ||
| <javadoc packagenames='javax.xml.*,org.w3c.*,org.xml.*' | ||
| locale='en_US' | ||
|
|
@@ -525,7 +525,11 @@ Authors: | |
| windowtitle='XML Standard API' doctitle='XML Standard API' | ||
| bottom='${copyright}' | ||
| additionalparam='-quiet ${additional.param}' | ||
| /> | ||
| failonerror='no' | ||
| failonwarning='no' | ||
| > | ||
| <arg value="-Xdoclint:none"/> | ||
| </javadoc> | ||
| <mkdir dir='${build.dir}/docs/javadocs/xni'/> | ||
| <javadoc packagenames='org.apache.xerces.xni.*' | ||
| locale='en_US' | ||
|
|
@@ -535,7 +539,11 @@ Authors: | |
| doctitle='Xerces Native Interface' | ||
| bottom='${copyright}' | ||
| additionalparam='-quiet ${additional.param}' | ||
| /> | ||
| failonerror='yes' | ||
| failonwarning='yes' | ||
| > | ||
| <arg value="-Xdoclint:html,accessibility"/> | ||
| </javadoc> | ||
| <mkdir dir='${build.dir}/docs/javadocs/xs'/> | ||
| <javadoc packagenames='org.apache.xerces.xs, org.apache.xerces.xs.datatypes' | ||
| locale='en_US' | ||
|
|
@@ -545,7 +553,11 @@ Authors: | |
| doctitle='XML Schema API' | ||
| bottom='${copyright}' | ||
| additionalparam='-quiet ${additional.param}' | ||
| /> | ||
| failonerror='yes' | ||
| failonwarning='yes' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. revert |
||
| > | ||
| <arg value="-Xdoclint:html,accessibility"/> | ||
| </javadoc> | ||
|
|
||
| <mkdir dir='${build.dir}/docs/javadocs/xerces2'/> | ||
| <javadoc packagenames='org.apache.xerces.dom.*, | ||
|
|
@@ -564,7 +576,11 @@ Authors: | |
| doctitle='Xerces2 Implementation' | ||
| bottom='${copyright}' | ||
| additionalparam='-quiet ${additional.param}' | ||
| /> | ||
| failonerror='no' | ||
| failonwarning='no' | ||
| > | ||
| <arg value="-Xdoclint:html"/> | ||
| </javadoc> | ||
| <mkdir dir='${build.dir}/docs/javadocs/other'/> | ||
| <javadoc packagenames='org.apache.html.*, | ||
| org.apache.wml.*, | ||
|
|
@@ -575,7 +591,11 @@ Authors: | |
| windowtitle='Other Classes' doctitle='Other Classes' | ||
| bottom='${copyright}' | ||
| additionalparam='-quiet ${additional.param}' | ||
| /> | ||
| failonerror='yes' | ||
| failonwarning='yes' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. revert |
||
| > | ||
| <arg value="-Xdoclint:html"/> | ||
| </javadoc> | ||
| </target> | ||
|
|
||
| <!-- =================================================================== --> | ||
|
|
@@ -1075,7 +1095,7 @@ Authors: | |
|
|
||
| <copy file="${src.dir}/org/apache/xerces/dom/org.apache.xerces.dom.DOMImplementationSourceImpl" | ||
| tofile="${build.dest}/META-INF/services/org.w3c.dom.DOMImplementationSourceList"/> | ||
|
|
||
| <!-- delete META-INF/services files for DatatypeFactory/SchemaFactory | ||
| since no implementation is provided in this jar --> | ||
| <delete file="${build.dest}/META-INF/services/javax.xml.datatype.DatatypeFactory"/> | ||
|
|
@@ -1203,7 +1223,7 @@ Authors: | |
| token="return ((XSComplexTypeDecl) type).isDOMDerivedFrom(" value="return false;"/> | ||
| <replace file="${build.dir}/src/org/apache/xerces/dom/ElementNSImpl.java" | ||
| token="typeNamespaceArg, typeNameArg, derivationMethod);" value=""/> | ||
|
|
||
| <!-- HACK: Remove references to schema DOM from DOMUtil --> | ||
| <replace file="${build.dir}/src/org/apache/xerces/util/DOMUtil.java" | ||
| token="import org.apache.xerces.impl.xs.opti.ElementImpl;" value=""/> | ||
|
|
@@ -1221,7 +1241,7 @@ Authors: | |
| token="((org.apache.xerces.impl.xs.opti.NodeImpl)node).setReadOnly(false, false);" value="return;"/> | ||
| <replace file="${build.dir}/src/org/apache/xerces/util/DOMUtil.java" | ||
| token="return ((org.apache.xerces.impl.xs.opti.NodeImpl)node).getReadOnly();" value="return false;"/> | ||
|
|
||
| <!-- HACK: Remove references to schema validation support from org.apache.xerces.jaxp --> | ||
| <replace file="${build.dir}/src/org/apache/xerces/jaxp/SAXParserImpl.java" | ||
| token="import org.apache.xerces.impl.xs.XMLSchemaValidator;" value=""/> | ||
|
|
@@ -1247,7 +1267,7 @@ Authors: | |
| token="(XSGrammarPoolContainer) grammar, fSchemaValidationManager);" value=""/> | ||
| <replace file="${build.dir}/src/org/apache/xerces/jaxp/SAXParserImpl.java" | ||
| token="fSAXParser.fUnparsedEntityHandler.reset();" value=""/> | ||
|
|
||
| <replace file="${build.dir}/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java" | ||
| token="import org.apache.xerces.impl.xs.XMLSchemaValidator;" value=""/> | ||
| <replace file="${build.dir}/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java" | ||
|
|
@@ -1272,7 +1292,7 @@ Authors: | |
| token="(XSGrammarPoolContainer) grammar, fSchemaValidationManager);" value=""/> | ||
| <replace file="${build.dir}/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java" | ||
| token="fUnparsedEntityHandler.reset();" value=""/> | ||
|
|
||
| <replace file="${build.dir}/src/org/apache/xerces/jaxp/SAXParserFactoryImpl.java" | ||
| token="return grammar;" value="throw new UnsupportedOperationException();"/> | ||
| <replace file="${build.dir}/src/org/apache/xerces/jaxp/SAXParserFactoryImpl.java" | ||
|
|
@@ -1552,7 +1572,7 @@ Authors: | |
| </manifest> | ||
| <metainf dir="." includes="LICENSE,NOTICE"/> | ||
| </jar> | ||
| </target> | ||
| </target> | ||
|
|
||
| <!-- =================================================================== --> | ||
| <!-- Builds xercesImpl, xml-apis and sample jars with Schema 1.1 support --> | ||
|
|
@@ -1572,10 +1592,10 @@ Authors: | |
| <target name="xjavac-jar" depends="prepare"> | ||
| <mkdir dir="${build.src}"/> | ||
| <mkdir dir="${build.dest}"/> | ||
|
|
||
| <copy file="${tools.dir}/src/XJavac.java" | ||
| tofile="${build.src}/org/apache/xerces/util/XJavac.java"/> | ||
|
|
||
| <javac srcdir="${build.src}" | ||
| destdir="${build.dest}" | ||
| source="${javac.source}" | ||
|
|
@@ -1587,7 +1607,7 @@ Authors: | |
| optimize="${optimize}" | ||
| includeAntRuntime="false" | ||
| includeJavaRuntime="false"/> | ||
|
|
||
| <jar jarfile="${build.dir}/${jar.xjavac}" | ||
| basedir="${build.dest}" | ||
| compress="true" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -218,7 +218,7 @@ else if (next == '^' && offset + 1 < len) { | |
|
|
||
| /** | ||
| * Sample entry. | ||
| * <div>Usage: <KBD>org.apache.xerces.utils.regex.REUtil <regex> <string></KBD></div> | ||
| * <p>Usage: <code>org.apache.xerces.utils.regex.REUtil <regex> <string></code></p> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should probably be samp instead of code if I recall correctly
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't use samp in Javadoc due to: could use pre if preferred |
||
| */ | ||
| public static void main(String[] argv) { | ||
| String pattern = null; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I do not want the build to fail on a warning. I'm not sure it should fail on an error here, but definitely not on a warning
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not? It helps having a cleaner codebase imho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've only set yes on the sections that don't have any errors or warnings. This branch passes, so setting yes here is to ensure future changes don't introduce problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saying that, I just saw that behaviour is different on the CI build. I'll take a look at why it's passing locally but not on CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been using JDK 8 locally, I'll make sure to fix errors for newer JDK linter problems as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was simply that later JDKs also error if table in a package.html file don't have a caption. Fixed now