Skip to content

Commit

Permalink
[Tools] Use type fullname to avoid issue from class renaming. (Azure#…
Browse files Browse the repository at this point in the history
…14147)

* Optimize for CI filter.

* Add support for TargetModule

* Avoid the issue caused by renaming class.

* Avoid the issue caused by renaming class.

Co-authored-by: wyunchi-ms <[email protected]>
  • Loading branch information
wyunchi-ms and wyunchi-ms authored Feb 7, 2021
1 parent aeb124d commit 069bfa5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
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

0 comments on commit 069bfa5

Please sign in to comment.