Skip to content

Commit 9c4f5d1

Browse files
committed
fix DocGenerator style violations
(cherry picked from commit 875c12b)
1 parent e42784e commit 9c4f5d1

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/DocGenerator/LitUp.cs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ public static async Task<int> GoAsync(string[] args)
7575
seenFailures = true;
7676
};
7777

78-
// Buildalyzer, similar to MsBuildWorkspace with the new csproj file format, does
79-
// not pick up source documents in the project directory. Manually add them
80-
// AddDocumentsToWorkspace(workspace);
81-
8278
var projects = workspace.CurrentSolution.Projects
8379
.ToDictionary(p => p.Name, StringComparer.OrdinalIgnoreCase);
8480

@@ -175,30 +171,5 @@ static void WaitForActualDelete(FileSystemInfo toDelete)
175171
}
176172
}
177173
}
178-
179-
private static void AddDocumentsToWorkspace(AdhocWorkspace workspace)
180-
{
181-
// we only need source for the Tests project.
182-
var projects = workspace.CurrentSolution.Projects.Where(p => p.Name == "Tests").ToList();
183-
184-
for (var i = 0; i < projects.Count; i++)
185-
{
186-
var project = projects[i];
187-
var files = (from f in Directory.GetFiles(Path.GetDirectoryName(project.FilePath), "*.cs", SearchOption.AllDirectories)
188-
let dir = new DirectoryInfo(f)
189-
where dir?.Parent != null && !SkipFolders.Contains(dir.Parent.Name)
190-
select new FileInfo(f)).ToList();
191-
192-
for (var index = 0; index < files.Count; index++)
193-
{
194-
var file = files[index];
195-
var document = project.AddDocument(file.Name, File.ReadAllText(file.FullName), filePath: file.FullName);
196-
project = document.Project;
197-
}
198-
199-
if (!workspace.TryApplyChanges(project.Solution))
200-
Console.WriteLine($"failed to apply changes to workspace from project {project.Name}");
201-
}
202-
}
203174
}
204175
}

0 commit comments

Comments
 (0)