Skip to content

Commit

Permalink
fix: Remove reporting in the new file.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelkahomolova committed Aug 30, 2019
1 parent fe4fb26 commit eac49c1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/reporters/JSONReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@ import { injectable, inject } from 'inversify';
import { Types } from '../types';
import { ArgumentsProvider } from '../inversify.config';
import _ from 'lodash';
import { FileSystemService } from '../services/FileSystemService';

@injectable()
export class JSONReporter implements IReporter {
private readonly argumentsProvider: ArgumentsProvider;
private readonly fileSystemService: FileSystemService;

constructor(
@inject(Types.ArgumentsProvider) argumentsProvider: ArgumentsProvider,
@inject(FileSystemService) fileSystemService: FileSystemService,
) {
constructor(@inject(Types.ArgumentsProvider) argumentsProvider: ArgumentsProvider) {
this.argumentsProvider = argumentsProvider;
this.fileSystemService = fileSystemService;
}

async report(practicesAndComponents: PracticeAndComponent[]): Promise<JSONReport> {
Expand All @@ -35,12 +29,7 @@ export class JSONReporter implements IReporter {
}
component.practices.push(pac.practice);
}
await this.reportInFile(report);

return report;
}

async reportInFile(report: JSONReport) {
await this.fileSystemService.writeFile(`${process.cwd()}/dxScannerOutput.json`, JSON.stringify(report, null, 4));
}
}

0 comments on commit eac49c1

Please sign in to comment.