authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-06-17 00:09:40-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-06-17 00:10:35-07:00
log1e9e29398a8e35917fd044f21b7cd0ab7394e5fb
tree3e9afb62aad2d00361c0632d6b6e61f77c363e46
parent651225c2d4d86c661dba134eee2e3af421bf04b0

disable tidy validation for autodocs

tidy gives a false positive: line 304 column 9 - Warning: moved <style> tag to <head>! fix-style-tags: no to avoid. I noticed that `--show-warnings no` still incorrectly causes exit code 1. I was unable to find an alternative to tidy.

1 files changed, 8 insertions(+), 4 deletions(-)

build.zig+8-4
......@@ -36,13 +36,17 @@ pub fn build(b: *std.Build) !void {
3636 const langref_file = generateLangRef(b);
3737 const install_langref = b.addInstallFileWithDir(langref_file, .prefix, "doc/langref.html");
3838 const check_langref = tidyCheck(b, langref_file);
39 const check_autodocs = tidyCheck(b, b.path("lib/docs/index.html"));
39 if (enable_tidy) install_langref.step.dependOn(check_langref);
40 // Checking autodocs is disabled because tidy gives a false positive:
41 // line 304 column 9 - Warning: moved <style> tag to <head>! fix-style-tags: no to avoid.
42 // I noticed that `--show-warnings no` still incorrectly causes exit code 1.
43 // I was unable to find an alternative to tidy.
44 //const check_autodocs = tidyCheck(b, b.path("lib/docs/index.html"));
4045 if (enable_tidy) {
4146 test_step.dependOn(check_langref);
42 test_step.dependOn(check_autodocs);
47 //test_step.dependOn(check_autodocs);
4348 }
4449 if (!skip_install_langref) {
45 if (enable_tidy) install_langref.step.dependOn(check_langref);
4650 b.getInstallStep().dependOn(&install_langref.step);
4751 }
4852
......@@ -58,8 +62,8 @@ pub fn build(b: *std.Build) !void {
5862 .install_dir = .prefix,
5963 .install_subdir = "doc/std",
6064 });
65 //if (enable_tidy) install_std_docs.step.dependOn(check_autodocs);
6166 if (std_docs) {
62 if (enable_tidy) install_std_docs.step.dependOn(check_autodocs);
6367 b.getInstallStep().dependOn(&install_std_docs.step);
6468 }
6569