2021-02-07 08:45:29 +03:00
|
|
|
|
//
|
|
|
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
//
|
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
|
// limitations under the License.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
using StaticAnalysis.BreakingChangeAnalyzer;
|
|
|
|
|
using StaticAnalysis.DependencyAnalyzer;
|
2021-03-04 13:09:42 +03:00
|
|
|
|
using StaticAnalysis.HelpAnalyzer;
|
2021-03-13 17:22:36 +03:00
|
|
|
|
using StaticAnalysis.SignatureVerifier;
|
2022-06-17 12:29:43 +03:00
|
|
|
|
using StaticAnalysis.ExampleAnalyzer;
|
2022-11-14 15:30:07 +03:00
|
|
|
|
using StaticAnalysis.UXMetadataAnalyzer;
|
2023-06-29 04:39:17 +03:00
|
|
|
|
using StaticAnalysis.GeneratedSdkAnalyzer;
|
2021-02-07 08:45:29 +03:00
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
using Tools.Common.Issues;
|
|
|
|
|
|
|
|
|
|
namespace StaticAnalysis
|
|
|
|
|
{
|
|
|
|
|
public static class ReportRecordFactory
|
|
|
|
|
{
|
|
|
|
|
public static IReportRecord Create(string type)
|
|
|
|
|
{
|
2021-02-07 10:54:48 +03:00
|
|
|
|
if (type.Equals(typeof(BreakingChangeIssue).FullName))
|
2021-02-07 08:45:29 +03:00
|
|
|
|
{
|
|
|
|
|
return new BreakingChangeIssue();
|
|
|
|
|
}
|
2021-02-07 10:54:48 +03:00
|
|
|
|
if (type.Equals(typeof(AssemblyVersionConflict).FullName))
|
2021-02-07 08:45:29 +03:00
|
|
|
|
{
|
|
|
|
|
return new AssemblyVersionConflict();
|
|
|
|
|
}
|
2021-02-07 10:54:48 +03:00
|
|
|
|
if (type.Equals(typeof(SharedAssemblyConflict).FullName))
|
2021-02-07 08:45:29 +03:00
|
|
|
|
{
|
|
|
|
|
return new SharedAssemblyConflict();
|
|
|
|
|
}
|
2021-02-07 10:54:48 +03:00
|
|
|
|
if (type.Equals(typeof(MissingAssembly).FullName))
|
2021-02-07 08:45:29 +03:00
|
|
|
|
{
|
|
|
|
|
return new MissingAssembly();
|
|
|
|
|
}
|
2021-02-07 10:54:48 +03:00
|
|
|
|
if (type.Equals(typeof(ExtraAssembly).FullName))
|
2021-02-07 08:45:29 +03:00
|
|
|
|
{
|
|
|
|
|
return new ExtraAssembly();
|
|
|
|
|
}
|
2021-03-04 13:09:42 +03:00
|
|
|
|
if (type.Equals(typeof(HelpIssue).FullName))
|
|
|
|
|
{
|
|
|
|
|
return new HelpIssue();
|
|
|
|
|
}
|
2021-03-13 17:22:36 +03:00
|
|
|
|
if (type.Equals(typeof(SignatureIssue).FullName))
|
|
|
|
|
{
|
|
|
|
|
return new SignatureIssue();
|
|
|
|
|
}
|
2022-06-17 12:29:43 +03:00
|
|
|
|
if (type.Equals(typeof(ExampleIssue).FullName))
|
|
|
|
|
{
|
|
|
|
|
return new ExampleIssue();
|
|
|
|
|
}
|
2022-11-14 15:30:07 +03:00
|
|
|
|
if (type.Equals(typeof(UXMetadataIssue).FullName))
|
|
|
|
|
{
|
|
|
|
|
return new UXMetadataIssue();
|
|
|
|
|
}
|
2023-07-03 05:22:24 +03:00
|
|
|
|
if (type.Equals(typeof(GeneratedSdkIssue).FullName))
|
2023-06-29 04:39:17 +03:00
|
|
|
|
{
|
2023-07-03 05:22:24 +03:00
|
|
|
|
return new GeneratedSdkIssue();
|
2023-06-29 04:39:17 +03:00
|
|
|
|
}
|
2021-02-07 08:45:29 +03:00
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|