-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
41 lines (37 loc) · 768 Bytes
/
types.ts
File metadata and controls
41 lines (37 loc) · 768 Bytes
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
export interface HalsteadMetrics {
vocabulary: number;
length: number;
volume: number;
difficulty: number;
effort: number;
bugs: number;
time: number;
}
export interface ComplexityResult {
cyclomatic: number;
halstead: HalsteadMetrics;
maintainabilityIndex: number;
isDefective: boolean; // Heuristic based
}
export interface FileAnalysis {
fileName: string;
path: string;
content: string;
language: string;
size: number;
metrics: ComplexityResult;
}
export interface RepoInfo {
owner: string;
name: string;
branch?: string;
url: string;
}
export enum AppState {
IDLE = 'IDLE',
FETCHING_TREE = 'FETCHING_TREE',
FETCHING_FILES = 'FETCHING_FILES',
ANALYZING = 'ANALYZING',
RESULTS = 'RESULTS',
ERROR = 'ERROR',
}