Skip to content

Commit a75b92e

Browse files
k-wallebullient
authored andcommitted
Correct Boundary Regex in PolicyPanda
Java requires backslashes to be escaped.
1 parent df312cf commit a75b92e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/panda/PolicyPanda.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private void processRepository(GHRepository repo, CommunityFiles orgFiles) throw
203203
// Check if contributing mentions DCO
204204
if (repoFiles.contributing() != null) {
205205
String content = readContent(repoFiles.contributing());
206-
boolean hasDcoMention = content.matches("(?is).*\b(DCO|Developer Certificate of Origin)\b.*");
206+
boolean hasDcoMention = content.matches("(?is).*\\b(DCO|Developer Certificate of Origin)\\b.*");
207207
addCheck(repo, new ContentCheck("DCO Reference", "DCO mentioned in CONTRIBUTING",
208208
Kind.MUST, hasDcoMention, repoFiles.contributing()));
209209
}
@@ -215,7 +215,7 @@ private void processRepository(GHRepository repo, CommunityFiles orgFiles) throw
215215
// Check if contributing mentions CLA
216216
if (repoFiles.contributing() == null) {
217217
String content = readContent(repoFiles.contributing());
218-
boolean hasCLAMention = content.matches("(?is).*\b(CLA|Contributor License Agreement)\b.*");
218+
boolean hasCLAMention = content.matches("(?is).*\\b(CLA|Contributor License Agreement)\\b.*");
219219
addCheck(repo, new ContentCheck("CLA Reference", "CLA mentioned in CONTRIBUTING",
220220
Kind.MUST, hasCLAMention, repoFiles.contributing()));
221221
}
@@ -622,4 +622,4 @@ private List<String> text() {
622622
return text;
623623
}
624624
}
625-
}
625+
}

0 commit comments

Comments
 (0)