Skip to content

Commit

Permalink
fix: Improve the JSONReport.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelkahomolova committed Aug 28, 2019
1 parent 8fe4d24 commit da37a50
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/reporters/IReporter.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import { PracticeAndComponent, PracticeImpact, ProjectComponentPlatform } from '../model';
import { PracticeAndComponent, PracticeImpact, ProjectComponentPlatform, ProgrammingLanguage } from '../model';
import { ServiceType } from '../detectors/ScanningStrategyDetector';

export interface IReporter {
report(practicesAndComponents: PracticeAndComponent[]): string;
}

export interface JSONReport {
repository: RepoInfo[];
practice: PracticeInfo[];
export type JSONReport = { components: ComponentReport[] };

export interface ComponentReport {
path: string;
platform: ProjectComponentPlatform;
serviceType: ServiceType;
uri: string;
language: ProgrammingLanguage;
practices: PracticeInfo[];
}

export interface PracticeInfo {
Expand All @@ -16,11 +22,3 @@ export interface PracticeInfo {
impact: PracticeImpact;
url: string;
}

interface RepoInfo {
owner: string;
repoName: string;
platform: ProjectComponentPlatform;
serviceType: ServiceType;
uri: string;
}

0 comments on commit da37a50

Please sign in to comment.