Skip to content

Commit

Permalink
Issue checkstyle#56: all html pages that has http lnks were updated b…
Browse files Browse the repository at this point in the history
…y content from official html web site
  • Loading branch information
romani authored and tsjensen committed Mar 21, 2019
1 parent eb9646b commit ba5e0aa
Show file tree
Hide file tree
Showing 9 changed files with 869 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,170 @@
<div >
<h2><a name="AvoidEscapedUnicodeCharacters"></a>AvoidEscapedUnicodeCharacters</h2>

<div >
<h3><a name="Description"></a>Description</h3>

<p>
Restrict using <a href = "http://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.3">
Unicode escapes</a> (e.g. \u221e).
It is possible to allow using escapes for
<a href="http://en.wiktionary.org/wiki/Appendix:Control_characters"> non-printable(control) characters</a>.
Also, this check can be configured to allow using escapes
if trail comment is present. By the option it is possible to
allow using escapes if literal contains only them.
</p>
Restrict using <a class="externalLink" href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.3">
Unicode escapes</a> (e.g. \u221e).
It is possible to allow using escapes for
<a class="externalLink" href="https://en.wiktionary.org/wiki/Appendix:Control_characters"> non-printable(control) characters</a>.
Also, this check can be configured to allow using escapes
if trail comment is present. By the option it is possible to
allow using escapes if literal contains only them.
</p>
</div>


<div class="section">
<h3><a name="Properties"></a>Properties</h3>

<table class="bodyTable" border="0">

<tbody><tr class="a">

<th>name</th>

<th>description</th>

<th>type</th>

<th>default value</th>
</tr>

<tr class="b">

<td>allowEscapesForControlCharacters</td>

<td>Allow use escapes for non-printable(control) characters.</td>

<td><a href="http://checkstyle.sourceforge.net/property_types.html#boolean">Boolean</a></td>

<td>false</td>
</tr>

<tr class="a">

<td>allowByTailComment</td>

<td>Allow use escapes if trail comment is present.</td>

<td><a href="http://checkstyle.sourceforge.net/property_types.html#boolean">Boolean</a></td>

<td>false</td>
</tr>

<tr class="b">

<td>allowIfAllCharactersEscaped</td>

<td>Allow if all characters in literal are escaped.</td>

<td><a href="http://checkstyle.sourceforge.net/property_types.html#boolean">Boolean</a></td>

<td>false</td>
</tr>

<tr class="a">

<td>allowNonPrintableEscapes</td>

<td>Allow non-printable escapes.</td>

<td><a href="http://checkstyle.sourceforge.net/property_types.html#boolean">Boolean</a></td>

<td>false</td>
</tr>
</tbody></table>
</div>


<div class="section">
<h3><a name="Examples"></a>Examples</h3>

<p>
Examples of using Unicode:
</p>

<div class="source">
<pre>String unitAbbrev = "μs"; //Best: perfectly clear even without a comment.
String unitAbbrev = "\u03bcs"; //Poor: the reader has no idea what this is.
</pre></div>

<p>
An example of how to configure the check is:
</p>

<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"/&gt;
</pre></div>

<p>
An example of non-printable(control) characters.
</p>

<div class="source">
<pre>return '\ufeff' + content; // byte order mark
</pre></div>

<p>
An example of how to configure the check to allow using escapes
for non-printable(control) characters:
</p>

<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"&gt;
&lt;property name="allowEscapesForControlCharacters" value="true"/&gt;
&lt;/module&gt;
</pre></div>

<p>
Example of using escapes with trail comment:
</p>

<div class="source">
<pre>String unitAbbrev = "\u03bcs"; // Greek letter mu, "s"
</pre></div>

<p>
An example of how to configure the check to allow using escapes
if trail comment is present:
</p>

<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"&gt;
&lt;property name="allowByTailComment" value="true"/&gt;
&lt;/module&gt;
</pre></div>

<p>
Example of using escapes if literal contains only them:
</p>

<div class="source">
<pre>String unitAbbrev = "\u03bc\u03bc\u03bc";
</pre></div>

<p>
An example of how to configure the check to allow escapes
if literal contains only them:
</p>

<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"&gt;
&lt;property name="allowIfAllCharactersEscaped" value="true"/&gt;
&lt;/module&gt;
</pre></div>

<p>
An example of how to configure the check to allow non-printable escapes:
</p>

<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"&gt;
&lt;property name="allowNonPrintableEscapes" value="true"/&gt;
&lt;/module&gt;
</pre></div>
</div>

</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Checks that long constants are defined with an upper ell. That is ' L' and not 'l'.
This is in accordance to the Java Language Specification, <a href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.1">Section 3.10.1</a>.
<p>
Checks that long constants are defined with an upper ell. That
is <tt>' L'</tt> and not <tt>'l'</tt>. This is in accordance with the Java
Language Specification, <a class="externalLink" href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.1">
Section 3.10.1</a>.
</p>


<p>
</p>
The capital L looks a lot like <tt>1</tt>.
</p>
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
<p>This check makes sure that all package annotations are in the package-info.java file.</p>
<p>According to the Java JLS 3rd ed.</p>
<p>The JLS does not enforce the placement of package annotations. This placement may vary based on implementation. The JLS does highly recommend that all package annotations are placed in the package-info.java file. See <a href="http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html">Java Language specification, sections 7.4.1.1</a>.</p>
<h2><a name="PackageAnnotation"></a>PackageAnnotation</h2>

<div >
<h3><a name="Description"></a>Description</h3>

<p> This check makes sure that all package annotations are in the
package-info.java file.
</p>

<p>
According to the Java Language Specification.
</p>


<p>
The JLS does not enforce the placement of package annotations.
This placement may vary based on implementation. The JLS
does highly recommend that all package annotations are
placed in the package-info.java file.

See <a class="externalLink" href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.4.1">
Java Language Specification, section 7.4.1</a>.
</p>
</div>
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<p>
Checks that each top-level class, interface or
enum resides in a source file of its own.
Official description of a 'top-level' term:<a
href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.6">7.6. Top Level Type Declarations</a>.
If file doesn't contains public class, enum or interface,
top-level type is the first type in file.
</p>
Checks that each top-level class, interface or
enum resides in a source file of its own.
Official description of a 'top-level' term:<a class="externalLink" href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.6">7.6. Top Level Type Declarations</a>.
If file doesn't contains public class, enum or interface,
top-level type is the first type in file.
</p>
Loading

0 comments on commit ba5e0aa

Please sign in to comment.