From da37a50b1a74a8bdb9e357b58b106b20d0db6cb6 Mon Sep 17 00:00:00 2001 From: Adela Homolova Date: Wed, 28 Aug 2019 16:11:49 +0200 Subject: [PATCH] fix: Improve the JSONReport. --- src/reporters/IReporter.ts | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/reporters/IReporter.ts b/src/reporters/IReporter.ts index 96609430a..44b576dc2 100644 --- a/src/reporters/IReporter.ts +++ b/src/reporters/IReporter.ts @@ -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 { @@ -16,11 +22,3 @@ export interface PracticeInfo { impact: PracticeImpact; url: string; } - -interface RepoInfo { - owner: string; - repoName: string; - platform: ProjectComponentPlatform; - serviceType: ServiceType; - uri: string; -}