-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnalysisModels.cs
More file actions
91 lines (84 loc) · 2.06 KB
/
AnalysisModels.cs
File metadata and controls
91 lines (84 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
namespace DotNetDevMCP.Analysis.Models;
/// <summary>
/// Represents the result of a code analysis operation
/// </summary>
public sealed record AnalysisResult(
string ProjectPath,
int TotalFiles,
int TotalLines,
int CodeLines,
int CommentLines,
int BlankLines,
int Classes,
int Methods,
double MaintainabilityIndex,
double CyclomaticComplexity,
DateTime AnalyzedAt
);
/// <summary>
/// Represents code quality metrics for a project
/// </summary>
public sealed record CodeQualityMetrics(
string ProjectPath,
double TechnicalDebtHours,
int CodeSmells,
int Bugs,
int Vulnerabilities,
double Coverage,
double Duplication,
IReadOnlyList<CodeIssue> Issues,
DateTime AnalyzedAt
);
/// <summary>
/// Represents a single code issue
/// </summary>
public sealed record CodeIssue(
string RuleId,
string Message,
string Severity,
string FilePath,
int LineNumber,
int ColumnNumber,
string? Suggestion = null
);
/// <summary>
/// Represents dependency information for a project
/// </summary>
public sealed record DependencyInfo(
string ProjectPath,
IReadOnlyList<PackageDependency> PackageDependencies,
IReadOnlyList<ProjectReference> ProjectReferences,
IReadOnlyList<string> FrameworkReferences,
bool HasCircularDependencies,
DateTime AnalyzedAt
);
/// <summary>
/// Represents a NuGet package dependency
/// </summary>
public sealed record PackageDependency(
string Name,
string Version,
bool IsDirect,
bool IsDevelopmentDependency,
string? LicenseUrl = null,
bool? HasKnownVulnerabilities = null
);
/// <summary>
/// Represents a project reference
/// </summary>
public sealed record ProjectReference(
string Name,
string Path,
bool IsProjectReference
);
/// <summary>
/// Request model for code analysis
/// </summary>
public sealed record AnalysisRequest(
string Path,
bool IncludeMetrics = true,
bool IncludeDependencies = true,
bool IncludeIssues = true,
string? Configuration = null,
string? Platform = null
);