Skip to content

Commit

Permalink
[CALCITE-6187] Linter should disallow tags such as '[MINOR]' in commi…
Browse files Browse the repository at this point in the history
…t messages
  • Loading branch information
julianhyde committed Jan 4, 2024
1 parent 429609c commit 3c19347
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/test/java/org/apache/calcite/test/LintTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ private static boolean isJava(String filename) {
hasSize(1));
assertThat(f.apply("[CALCITE-4817] cannot start with lower-case", ""),
hasItem("Message must start with upper-case letter"));
assertThat(f.apply("[MINOR] Lint", ""),
hasItem("starts with '[', and is not '[CALCITE-nnnn]'"));

// If 'Lint:skip' occurs in the body, no checks are performed
assertThat(
Expand Down Expand Up @@ -375,6 +377,9 @@ private static void checkMessage(String subject, String body,
+ "problem, not what you did");
}
}
if (subject2.startsWith("[")) {
consumer.accept("starts with '[', and is not '[CALCITE-nnnn]'");
}
if (subject2.startsWith(" ")) {
consumer.accept("starts with space");
}
Expand Down

0 comments on commit 3c19347

Please sign in to comment.