Skip to content

[Tools] Use type fullname to avoid issue from class renaming. #14147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tools/StaticAnalysis/IssueChecker/IssueChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public class IssueChecker : IStaticAnalyzer
{
private readonly List<(string, string)> exceptionLogInfoList = new List<(string, string)>()
{
("BreakingChangeIssues.csv", "BreakingChangeIssues"),
("AssemblyVersionConflict.csv", "AssemblyVersionConflict"),
("SharedAssemblyConflict.csv", "SharedAssemblyConflict"),
("MissingAssemblies.csv", "MissingAssembly"),
("ExtraAssemblies.csv", "ExtraAssembly"),
("BreakingChangeIssues.csv", typeof(BreakingChangeIssue).FullName),
("AssemblyVersionConflict.csv", typeof(AssemblyVersionConflict).FullName),
("SharedAssemblyConflict.csv", typeof(SharedAssemblyConflict).FullName),
("MissingAssemblies.csv", typeof(MissingAssembly).FullName),
("ExtraAssemblies.csv", typeof(ExtraAssembly).FullName),
};
public AnalysisLogger Logger { get; set; }

Expand Down
10 changes: 5 additions & 5 deletions tools/StaticAnalysis/ReportRecordFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ public static class ReportRecordFactory
{
public static IReportRecord Create(string type)
{
if (type.Equals("BreakingChangeIssue"))
if (type.Equals(typeof(BreakingChangeIssue).FullName))
{
return new BreakingChangeIssue();
}
if (type.Equals("AssemblyVersionConflict"))
if (type.Equals(typeof(AssemblyVersionConflict).FullName))
{
return new AssemblyVersionConflict();
}
if (type.Equals("SharedAssemblyConflict"))
if (type.Equals(typeof(SharedAssemblyConflict).FullName))
{
return new SharedAssemblyConflict();
}
if (type.Equals("MissingAssembly"))
if (type.Equals(typeof(MissingAssembly).FullName))
{
return new MissingAssembly();
}
if (type.Equals("ExtraAssembly"))
if (type.Equals(typeof(ExtraAssembly).FullName))
{
return new ExtraAssembly();
}
Expand Down