From ea355e137f221efd396d033ba735428e6ccb3d9d Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Sun, 30 Nov 2014 21:38:29 -0800 Subject: [PATCH] Fix #118, Only check K projects for XML documentation errors - ignore leftover XML files e.g. from other branches - tested manually in MVC repo with a bad doc file outside a K project - limit checked XML files to those in `bin` directory under K projects - align with clean target: that only removes bin directories under K projects - approach ignores XML files in .csproj projects but no such projects in repos where _k-xml-docs-test.shade file is used Address old [comment](https://github.com/aspnet/Universe/pull/101/files#r16633938) from @Eilon on PR#101 > Traditionally we use i++ and not ++i. --- build/_k-xml-docs-test.shade | 59 ++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/build/_k-xml-docs-test.shade b/build/_k-xml-docs-test.shade index c703942c8f..3fbc89033e 100644 --- a/build/_k-xml-docs-test.shade +++ b/build/_k-xml-docs-test.shade @@ -8,41 +8,48 @@ default BASE_DIR='${Directory.GetCurrentDirectory()}' @{ var srcDir = Path.Combine(BASE_DIR, "src"); - foreach (var xmlFilePath in Files.Include(Path.Combine(srcDir, "**/*.xml"))) + foreach (var projectFile in Files.Include(Path.Combine(srcDir, "**", "project.json"))) { - var errors = 0; - var xmlLines = File.ReadAllLines(xmlFilePath); - for (var linesIndex = 0; linesIndex < xmlLines.Length; ++linesIndex) + var binDirectory = Path.Combine(Path.GetDirectoryName(projectFile), "bin"); + if (Directory.Exists(binDirectory)) { - var xmlLine = xmlLines[linesIndex].Trim(); - if (xmlLine.StartsWith("