Skip to content

Commit

Permalink
[CI] Ensure that htmltest-config warnings fail GH check
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Nov 15, 2024
1 parent ad58587 commit 2ac6eaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"fix": "npm run fix:all",
"format": "npm run _check:format -- --write && npm run _check:format:ja+zh -- --write",
"get:submodule": "npm run _get:${GET:-submodule} --",
"log:check:links": "npm run check:links | tee tmp/build-log.txt",
"log:test-and-fix": "npm run test-and-fix | tee tmp/build-log.txt",
"log:check:links": "npm run check:links 2>&1 | tee tmp/build-log.txt",
"log:test-and-fix": "npm run test-and-fix 2>&1 | tee tmp/build-log.txt",
"make:public": "make public ls-public",
"netlify-build:preview": "npm run seq -- build:preview diff:check",
"netlify-build:production": "npm run seq -- build:production diff:check",
Expand Down
6 changes: 3 additions & 3 deletions scripts/htmltest-config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sub extract_htmltest_config {
return unless @htmltest_config;

if (@htmltest_config == 1) {
warn "Warning: Failed to extract htmltest config from front matter in file '$file_path'.\n";
warn "WARNING: Failed to extract htmltest config from front matter in file '$file_path'.\n";
return;
}

Expand All @@ -51,7 +51,7 @@ sub extract_htmltest_config {

# TODO: Add support for `IgnoreURLs`.

warn "Warning: Unrecognized htmltest config from front matter in file '$file_path'.\n";
warn "WARNING: Unrecognized htmltest config from front matter in file '$file_path'.\n";
}

sub _extract_ignore_dirs {
Expand All @@ -67,7 +67,7 @@ sub _extract_ignore_dirs {
} elsif ($line =~ /^IgnoreDirs:\s*\[\s*(.*?)\s*\]/i || $line =~ /^\s*-\s*(.*?)$/) {
push @config, (split /\s*,\s*/, $1);
} else {
warn "Warning: Unrecognized htmltest IgnoreDirs config from front matter in file '$file_path': $line\n";
warn "WARNING: Unrecognized htmltest IgnoreDirs config from front matter in file '$file_path': $line\n";
}
}
return @config;
Expand Down

0 comments on commit 2ac6eaa

Please sign in to comment.