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 {...@@ -36,13 +36,17 @@ pub fn build(b: *std.Build) !void {
36 const langref_file = generateLangRef(b);36 const langref_file = generateLangRef(b);
37 const install_langref = b.addInstallFileWithDir(langref_file, .prefix, "doc/langref.html");37 const install_langref = b.addInstallFileWithDir(langref_file, .prefix, "doc/langref.html");
38 const check_langref = tidyCheck(b, langref_file);38 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"));
40 if (enable_tidy) {45 if (enable_tidy) {
41 test_step.dependOn(check_langref);46 test_step.dependOn(check_langref);
42 test_step.dependOn(check_autodocs);47 //test_step.dependOn(check_autodocs);
43 }48 }
44 if (!skip_install_langref) {49 if (!skip_install_langref) {
45 if (enable_tidy) install_langref.step.dependOn(check_langref);
46 b.getInstallStep().dependOn(&install_langref.step);50 b.getInstallStep().dependOn(&install_langref.step);
47 }51 }
4852
...@@ -58,8 +62,8 @@ pub fn build(b: *std.Build) !void {...@@ -58,8 +62,8 @@ pub fn build(b: *std.Build) !void {
58 .install_dir = .prefix,62 .install_dir = .prefix,
59 .install_subdir = "doc/std",63 .install_subdir = "doc/std",
60 });64 });
65 //if (enable_tidy) install_std_docs.step.dependOn(check_autodocs);
61 if (std_docs) {66 if (std_docs) {
62 if (enable_tidy) install_std_docs.step.dependOn(check_autodocs);
63 b.getInstallStep().dependOn(&install_std_docs.step);67 b.getInstallStep().dependOn(&install_std_docs.step);
64 }68 }
6569