Skip to content

Commit 825c54c

Browse files
committed
#343 Make Baeldung exclusion a real regex
1 parent db73cfa commit 825c54c

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

htmlSanityCheck-gradle-plugin/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ htmlSanityCheck {
328328
checkerClasses = [DuplicateIdChecker, MissingImageFilesChecker]
329329
330330
// Exclude from checking
331-
excludes = ["(http|https)://exclude.this/url.*", ".*skip-host.org.*", "https://www.baeldung.com/.*"] // <1>
331+
excludes = ["(http|https)://exclude\\.this/url.*", ".*skip-host\\.org.*", "https://www\\.baeldung\\.com/.*"] // <1>
332332
}
333333
----
334334

integration-test/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ tasks.register("integrationTestCli") {
115115
buildReportsDirectory.mkdirs()
116116
final String hscScriptFileName = "../htmlSanityCheck-cli/${BUILD_DIRECTORY}/install/hsc/bin/hsc"
117117
String params = "-r ${buildReportsDirectory} " +
118-
"--exclude https://www.baeldung.com/.*" +
118+
"--exclude https://www\\.baeldung\\.com/.*" +
119119
"${INTEGRATION_TEST_DIRECTORY_COMMON_BUILD}/docs"
120120
if (System.getProperty("os.name") ==~ /Windows.*/) {
121121
commandLine 'cmd', '/c', "echo off && ${hscScriptFileName.replace('/', '\\')}.bat ${params}"
@@ -212,7 +212,7 @@ tasks.register("integrationTestDocker") {
212212
'docker --version'.execute().waitFor()
213213
}
214214
} catch (Exception e) {
215-
logger.quiet("Docker is not available - skipping Docker integration tests")
215+
logger.quiet("Docker is not available - skipping Docker integration tests", e)
216216
return
217217
}
218218

@@ -226,7 +226,7 @@ tasks.register("integrationTestDocker") {
226226
String docsDir = file("${INTEGRATION_TEST_DIRECTORY_COMMON_BUILD}/docs").absolutePath
227227
String reportsDir = buildReportsDirectory.absolutePath
228228

229-
String params = "--rm -v \"${docsDir}:${docsDir}\" -v \"${reportsDir}\":/reports -w \"${docsDir}\" ${image} -r /reports --exclude https://www.baeldung.com/.*"
229+
String params = "--rm -v \"${docsDir}:${docsDir}\" -v \"${reportsDir}\":/reports -w \"${docsDir}\" ${image} -r /reports --exclude https://www\\.baeldung\\.com/.*"
230230
def result = exec {
231231
if (System.getProperty("os.name") ==~ /Windows.*/) {
232232
// Use cmd to run docker on Windows

integration-test/gradle-plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ File reports = file("${Project.DEFAULT_BUILD_DIR_NAME}/reports")
1010
htmlSanityCheck {
1111
sourceDir = file("../common/${Project.DEFAULT_BUILD_DIR_NAME}/docs")
1212

13-
excludes = ["https://www.baeldung.com/.*"]
13+
excludes = ["https://www\\.baeldung\\.com/.*"]
1414

1515
httpSuccessCodes = [429]
1616

integration-test/maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<file>../common/build/docs/README.html</file>
3434
</sourceDocuments>
3535
<excludes>
36-
<exclude>https://www.baeldung.com/.*</exclude>
36+
<exclude>https://www\.baeldung\.com/.*</exclude>
3737
</excludes>
3838
<sourceDir>../common/build/docs</sourceDir>
3939
<checkingResultsDir>${project.build.directory}/reports</checkingResultsDir>

self-check/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ htmlSanityCheck {
77

88
checkingResultsDir = file("../build/reports/htmlchecks")
99
excludes = [
10-
"https://www.baeldung.com/.*", // Baeldung seems to have implemented some anti-robot/GPT strategy?
10+
"https://www\.baeldung\.com/.*", // Baeldung seems to have implemented some anti-robot/GPT strategy?
1111
"https://www.iconfinder.com/icons/118743/arrow_up_icon", "https://www.freepik.com/", // Both fail frequently on GitHub pages
1212
]
1313

0 commit comments

Comments
 (0)