| ... | @@ -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 | } |
| 48 | | 52 | |
| ... | @@ -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 | } |
| 65 | | 69 | |