Skip to content

Commit

Permalink
fix: remove unnecessary returning
Browse files Browse the repository at this point in the history
  • Loading branch information
adelkahomolova committed Nov 11, 2019
1 parent 9acb9ad commit 0d33fd3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/scanner/Scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ export class Scanner {
const languagesAtPaths = await this.detectLanguagesAtPaths(scannerContext);
this.scanDebug(`LanguagesAtPaths (${languagesAtPaths.length}):`, inspect(languagesAtPaths));
const projectComponents = await this.detectProjectComponents(languagesAtPaths, scannerContext, scanStrategy);
this.scanDebug(`Components (${projectComponents.relevantComponents.length}):`, inspect(projectComponents));
const practicesWithContext = await this.detectPractices(projectComponents.relevantComponents);
this.scanDebug(`Components (${projectComponents.length}):`, inspect(projectComponents));
const practicesWithContext = await this.detectPractices(projectComponents);
this.scanDebug(`Practices (${practicesWithContext.length}):`, inspect(practicesWithContext));
await this.report(practicesWithContext);
this.scanDebug(
`Overall scan stats. LanguagesAtPaths: ${inspect(languagesAtPaths.length)}; Components: ${inspect(
projectComponents.components.length,
this.allDetectedComponents!.length,
)}; Practices: ${inspect(practicesWithContext.length)}.`,
);

Expand Down Expand Up @@ -149,8 +149,7 @@ export class Scanner {
}
}
this.allDetectedComponents = components;
const relevantComponents = await this.getRelevantComponents(components);
return { relevantComponents, components };
return await this.getRelevantComponents(components);
}
/**
* Detect applicable practices for each component
Expand Down

0 comments on commit 0d33fd3

Please sign in to comment.