Skip to content

Commit

Permalink
Remove temporary code
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed Jun 15, 2020
1 parent cf9e35a commit 57d58f1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
18 changes: 0 additions & 18 deletions src/Tools/CodeGeneration/Markdown/MarkdownGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,24 +182,6 @@ public static string CreateRefactoringMarkdown(RefactoringMetadata refactoring)
return document.ToString(format);
}

public static string CreateRefactoringMarkdown22(ImmutableArray<AnalyzerMetadata> analyzers, ImmutableArray<AnalyzerMetadata> formattingAnalyzers)
{
var format = new MarkdownFormat(tableOptions: MarkdownFormat.Default.TableOptions | TableOptions.FormatContent);

MDocument document = Document(
Table(TableRow("Old analyzer", "New analyzer"),
AnalyzersMapping.Mapping
.SelectMany(f => f.Value.Select(f2 => (oldId: f.Key, newId: f2)))
.OrderBy(f => f.oldId).Select(f =>
{
return TableRow(
Inline(Link(Bold(f.oldId), $"analyzers/{f.oldId}.md"), $" ({analyzers.FirstOrDefault(f2 => f2.Id == f.oldId)?.Title})"),
Inline(Link(Bold(f.newId), $"analyzers/{f.newId}.md"), $" ({formattingAnalyzers.FirstOrDefault(f2 => f2.Id == f.newId)?.Title})"));
})));

return document.ToString(format);
}

public static string CreateAnalyzerMarkdown(AnalyzerMetadata analyzer, IEnumerable<(string title, string url)> appliesTo = null)
{
var format = new MarkdownFormat(tableOptions: MarkdownFormat.Default.TableOptions | TableOptions.FormatContent);
Expand Down
4 changes: 0 additions & 4 deletions src/Tools/MetadataGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ private static async Task Main(string[] args)
ImmutableArray<CodeFixMetadata> codeFixes = metadata.CodeFixes;
ImmutableArray<CompilerDiagnosticMetadata> compilerDiagnostics = metadata.CompilerDiagnostics;

FileHelper.WriteAllText("migration.md", MarkdownGenerator.CreateRefactoringMarkdown22(analyzers, formattingAnalyzers), Encoding.UTF8, onlyIfChanges: false, fileMustExists: false);

Console.ReadKey();

WriteAnalyzersReadMe(@"Analyzers\README.md", analyzers, "Roslynator.Analyzers");

WriteAnalyzersReadMe(@"CodeAnalysis.Analyzers\README.md", codeAnalysisAnalyzers, "Roslynator.CodeAnalysis.Analyzers");
Expand Down

0 comments on commit 57d58f1

Please sign in to comment.