diff --git a/build.zig b/build.zig index 1cb73eb52a..3898acc6ac 100644 --- a/build.zig +++ b/build.zig @@ -31,9 +31,21 @@ pub fn build(b: *std.Build) !void { const skip_install_langref = b.option(bool, "no-langref", "skip copying of langref to the installation prefix") orelse skip_install_lib_files; const std_docs = b.option(bool, "std-docs", "include standard library autodocs") orelse false; const no_bin = b.option(bool, "no-bin", "skip emitting compiler binary") orelse false; + const enable_tidy = b.option(bool, "enable-tidy", "Check langref output HTML validity") orelse false; const langref_file = generateLangRef(b); const install_langref = b.addInstallFileWithDir(langref_file, .prefix, "doc/langref.html"); + const check_langref = tidyCheck(b, langref_file); + if (enable_tidy) install_langref.step.dependOn(check_langref); + // Checking autodocs is disabled because tidy gives a false positive: + // line 304 column 9 - Warning: moved