This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch drop_HydromaticFileSetCheck
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit f966d1790eae400d9537066fbf97fc88a7a26ba3
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Thu Dec 5 12:38:24 2019 +0300

    [CALCITE-3559] Fix broken CALCITE-... links
---
 build.gradle.kts                                                     | 4 ++++
 core/src/test/java/org/apache/calcite/test/JdbcTest.java             | 2 +-
 core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java | 2 +-
 core/src/test/java/org/apache/calcite/test/ScannableTableTest.java   | 4 ++--
 core/src/test/java/org/apache/calcite/tools/PlannerTest.java         | 2 +-
 5 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index ccbc819..a55c631 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -426,6 +426,10 @@ allprojects {
                     // (?-m) disables multiline, so $ matches the very end of 
the file rather than end of line
                     replaceRegex("Remove '// End file.java' trailer", 
"(?-m)\n// End [^\n]++.\\w++\\s*+$", "")
                     replaceRegex("<p> should not be placed a the end of the 
line", "(?-m)\\s*+<p> *+\n \\* ", "\n *\n * <p>")
+                    // Assume developer copy-pasted the link, and updated text 
only, so the url is old, and we replace it with the proper one
+                    replaceRegex(">[CALCITE-...] link styles: 1", 
"<a(?:(?!CALCITE-)[^>])++CALCITE-\\d+[^>]++>\\s*+\\[?(CALCITE-\\d+)\\]?", "<a 
href=\"https://issues.apache.org/jira/browse/\$1\";>[\$1]")
+                    // If the link was crafted manually, ensure it has 
[CALCITE-...] in the link text
+                    replaceRegex(">[CALCITE-...] link styles: 2", 
"<a(?:(?!CALCITE-)[^>])++(CALCITE-\\d+)[^>]++>\\s*+\\[?CALCITE-\\d+\\]?", "<a 
href=\"https://issues.apache.org/jira/browse/\$1\";>[\$1]")
                     bumpThisNumberIfACustomStepChanges(1)
                     custom("((() preventer") { contents: String ->
                         ParenthesisBalancer.apply(contents)
diff --git a/core/src/test/java/org/apache/calcite/test/JdbcTest.java 
b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
index 3650a82..05468e1 100644
--- a/core/src/test/java/org/apache/calcite/test/JdbcTest.java
+++ b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
@@ -2113,7 +2113,7 @@ public class JdbcTest {
   }
 
   /** Test case for
-   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-2381";>[CALCITE-2391]
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-2391";>[CALCITE-2391]
    * Aggregate query with UNNEST or LATERAL fails with
    * ClassCastException</a>. */
   @Test public void testAggUnnestColumn() {
diff --git 
a/core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java 
b/core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java
index 6a3e105..a4a63c5 100644
--- a/core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java
+++ b/core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java
@@ -853,7 +853,7 @@ public class ReflectiveSchemaTest {
   }
 
   /** Test case for
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-281";>[CALCITE-1919]
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-1919";>[CALCITE-1919]
    * NPE when target in ReflectiveSchema belongs to the unnamed package</a>. */
   @Test public void testReflectiveSchemaInUnnamedPackage() throws Exception {
     final Driver driver = new Driver();
diff --git a/core/src/test/java/org/apache/calcite/test/ScannableTableTest.java 
b/core/src/test/java/org/apache/calcite/test/ScannableTableTest.java
index a46ac45..ed8997a 100644
--- a/core/src/test/java/org/apache/calcite/test/ScannableTableTest.java
+++ b/core/src/test/java/org/apache/calcite/test/ScannableTableTest.java
@@ -319,7 +319,7 @@ public class ScannableTableTest {
   }
 
   /** Test case for
-   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-1031";>[CALCITE-3405]
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-3405";>[CALCITE-3405]
    * Prune columns for ProjectableFilterable when project is not simple 
mapping</a>. */
   @Test public void testPushNonSimpleMappingProject() throws Exception {
     final StringBuilder buf = new StringBuilder();
@@ -342,7 +342,7 @@ public class ScannableTableTest {
   }
 
   /** Test case for
-   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-1031";>[CALCITE-3405]
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-3405";>[CALCITE-3405]
    * Prune columns for ProjectableFilterable when project is not simple 
mapping</a>. */
   @Test public void testPushSimpleMappingProject() throws Exception {
     final StringBuilder buf = new StringBuilder();
diff --git a/core/src/test/java/org/apache/calcite/tools/PlannerTest.java 
b/core/src/test/java/org/apache/calcite/tools/PlannerTest.java
index 41be588..dfe9fee 100644
--- a/core/src/test/java/org/apache/calcite/tools/PlannerTest.java
+++ b/core/src/test/java/org/apache/calcite/tools/PlannerTest.java
@@ -1354,7 +1354,7 @@ public class PlannerTest {
   }
 
   /** Test case for
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-648";>[CALCITE-649]
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-648";>[CALCITE-648]
    * Update ProjectMergeRule description for new naming convention</a>. */
   @Test public void testMergeProjectForceMode() throws Exception {
     RuleSet ruleSet =

Reply via email to