Skip to content

Commit

Permalink
Issue #11865: Resolve link specefied as plain text idea violations
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyom-Yadav authored and nrmancuso committed Aug 10, 2022
1 parent a084320 commit 276263b
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,10 @@ public static Configuration loadConfiguration(InputSource configSource,
* with the string value of the corresponding data types. This method must remain
* outside inner class for easier testing since inner class requires an instance.
*
* <p>Code copied from ant -
* http://cvs.apache.org/viewcvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
* <p>Code copied from
* <a href="http://cvs.apache.org/viewcvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java">
* ant
* </a>
*
* @param value The string to be scanned for property references. Must
* not be {@code null}.
Expand Down Expand Up @@ -387,8 +389,10 @@ private static String replaceProperties(
* {@code null} entries in the first collection indicate a property
* reference from the second collection.
*
* <p>Code copied from ant -
* http://cvs.apache.org/viewcvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
* <p>Code copied from
* <a href="http://cvs.apache.org/viewcvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java">
* ant
* </a>
*
* @param value Text to parse. Must not be {@code null}.
* @param fragments Collection to add text fragments to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
* threads at the same time.
* Checker guarantees that there will be exactly one check instance
* This is similar to multi-file validation, which checkstyle does not support fully yet.
* Please refer to https://github.com/checkstyle/checkstyle/issues/3540 for details.
* Please refer to <a href="https://github.com/checkstyle/checkstyle/issues/3540">#3540</a>
* for details.
*
* @noinspection ClassIndependentOfModule, ClassOnlyUsedInOnePackage
* @noinspectionreason ClassIndependentOfModule - we keep this annotation at top level by design
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
* `--SEMI -&gt; ;
* </pre>
* <p>
* See https://github.com/checkstyle/checkstyle/pull/10434 for a good example of how
* See <a href="https://github.com/checkstyle/checkstyle/pull/10434">#10434</a>
* for a good example of how
* to make changes to Checkstyle's grammar and AST.
* </p>
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/**
* Simple SARIF logger.
* SARIF stands for the static analysis results interchange format.
* Reference: https://sarifweb.azurewebsites.net/
* See <a href="https://sarifweb.azurewebsites.net/">reference</a>
*/
public class SarifLogger extends AutomaticBean implements AuditListener {

Expand Down Expand Up @@ -233,7 +233,7 @@ private static String renderSeverityLevel(SeverityLevel severityLevel) {

/**
* Escape \b, \f, \n, \r, \t, \", \\ and U+0000 through U+001F.
* Reference: https://www.ietf.org/rfc/rfc4627.txt - 2.5. Strings
* See <a href="https://www.ietf.org/rfc/rfc4627.txt">reference</a> - 2.5. Strings
*
* @param value the value to escape.
* @return the escaped value if necessary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Catches {@code TreeWalkerAuditEvent} and generates corresponding xpath query.
* Stores violations and xpath queries map inside static variable
* for {@code XpathFileGeneratorAuditListener}.
* See issue #102 https://github.com/checkstyle/checkstyle/issues/102
* See issue <a href="https://github.com/checkstyle/checkstyle/issues/102">#102</a>
*/
public class XpathFileGeneratorAstFilter extends AutomaticBean implements TreeWalkerFilter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/**
* Generates <b>suppressions.xml</b> file, based on violations occurred.
* See issue #102 https://github.com/checkstyle/checkstyle/issues/102
* See issue <a href="https://github.com/checkstyle/checkstyle/issues/102">#102</a>
*/
public class XpathFileGeneratorAuditListener extends AutomaticBean implements AuditListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ public class AvoidEscapedUnicodeCharactersCheck

/**
* Regular expression for all escaped chars.
* See "EscapeSequence" at
* https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10.7
* See <a href="https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10.7">
* EscapeSequence</a>
*/
private static final Pattern ALL_ESCAPED_CHARS = Pattern.compile("^("
+ UNICODE_REGEXP.pattern()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private void checkThrows() {
/**
* Gets the start line of the method, excluding any annotations. This is required because the
* current {@link TokenTypes#METHOD_DEF} may not always be the start as seen in
* https://github.com/checkstyle/checkstyle/issues/3145.
* <a href="https://github.com/checkstyle/checkstyle/issues/3145">#3145</a>.
*
* @param mainAst
* The method definition ast.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ private void checkTryResources(final DetailAST resourcesSpecAst) {
}

/**
* Check if the expression is resource of try block.
* https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.20.3
* Check if the expression is resource of
* <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.20.3">
* try block</a>.
*
* @param expression The expression to check
* @return if the expression provided is try block's resource specification.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ public class JavadocStyleCheck

/**
* HTML tags that are allowed in java docs.
* From https://www.w3schools.com/tags/default.asp
* From <a href="https://www.w3schools.com/tags/default.asp">w3schools</a>:
* <br>
* The forms and structure tags are not allowed
*/
private static final Set<String> ALLOWED_TAGS = Set.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

/**
* This enum represents access modifiers.
* Access modifiers names are taken from JLS:
* https://docs.oracle.com/javase/specs/jls/se8/html/jls-6.html#jls-6.6
* Access modifiers names are taken from
* <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-6.html#jls-6.6">JLS</a>
*
*/
public enum AccessModifierOption {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ public static String relativizeAndNormalizePath(final String baseDirectory, fina
* <p>
* It is faster version of {@link String#startsWith(String)} optimized for
* one-character prefixes at the expense of
* some readability. Suggested by SimplifyStartsWith PMD rule:
* http://pmd.sourceforge.net/pmd-5.3.1/pmd-java/rules/java/optimizations.html#SimplifyStartsWith
* some readability. Suggested by
* <a href="http://pmd.sourceforge.net/pmd-5.3.1/pmd-java/rules/java/optimizations.html#SimplifyStartsWith">
* SimplifyStartsWith</a> PMD rule:
* </p>
*
* @param value
Expand All @@ -297,8 +298,9 @@ public static boolean startsWithChar(String value, char prefix) {
* <p>
* It is faster version of {@link String#endsWith(String)} optimized for
* one-character suffixes at the expense of
* some readability. Suggested by SimplifyStartsWith PMD rule:
* http://pmd.sourceforge.net/pmd-5.3.1/pmd-java/rules/java/optimizations.html#SimplifyStartsWith
* some readability. Suggested by
* <a href="http://pmd.sourceforge.net/pmd-5.3.1/pmd-java/rules/java/optimizations.html#SimplifyStartsWith">
* SimplifyStartsWith</a> PMD rule:
* </p>
*
* @param value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static boolean isTreeWalkerFilterModule(Class<?> clazz) {
/**
* Checks whether a class is {@code XpathFileGeneratorAstFilter} or
* {@code XpathFileGeneratorAuditListener}.
* See issue #102 https://github.com/checkstyle/checkstyle/issues/102
* See issue <a href="https://github.com/checkstyle/checkstyle/issues/102">#102</a>
*
* @param clazz class to check.
* @return true if a class name starts with `XpathFileGenerator`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,10 @@ && expandedTabColumn(ast) == columnNumber
* Custom method for Xpath generation to maintain compatibility
* with Saxon and encoding outside Ascii range characters.
*
* <p>According to Saxon documentation in http://saxon.sourceforge.net/saxon7.1/expressions.html
* From Saxon 7.1, string delimiters can be doubled within the string to represent
* <p>According to
* <a href="http://saxon.sourceforge.net/saxon7.1/expressions.html">Saxon documentation</a>:
* <br>
* From Saxon 7.1, string delimiters can be doubled within the string to represent`
* the delimiter itself: for example select='"He said, ""Go!"""'.
*
* <p>Guava cannot as Guava encoding does not meet our requirements like
Expand All @@ -361,7 +363,8 @@ private static String encode(String value) {

/**
* Encodes escape character for Xpath. Escape characters need '&amp;' before, but it also
* requires XML 1.1 until https://github.com/checkstyle/checkstyle/issues/5168.
* requires XML 1.1
* until <a href="https://github.com/checkstyle/checkstyle/issues/5168">#5168</a>.
*
* @param chr Character to check.
* @return String, Encoded string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public final class InlineConfigParser {
/**
* Checks in which violation message is not specified in input file and have more than
* one violation message key.
* Until <a>https://github.com/checkstyle/checkstyle/issues/11214</a>
* Until <a href="https://github.com/checkstyle/checkstyle/issues/11214">#11214</a>
*/
private static final Set<String> SUPPRESSED_CHECKS = new HashSet<>(Arrays.asList(
"com.puppycrawl.tools.checkstyle.checks.whitespace.MethodParamPadCheck",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class GeneratedJavaTokenTypesTest {
* </p>
*
* <p>
* Issue: https://github.com/checkstyle/checkstyle/issues/505
* Issue: <a href="https://github.com/checkstyle/checkstyle/issues/505">#505</a>
* </p>
*/
@Test
Expand Down

0 comments on commit 276263b

Please sign in to comment.