Skip to content

Commit

Permalink
refactor: rename var, add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcarman committed May 20, 2024
1 parent 7392597 commit cd353b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands/metalint/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ export default class MetalintRun extends SfCommand<MetalintRunResult> {

let results = '';

const formatFunctions = {
const resultFormatters = {
sarif: generateSarifResults,
csv: generateCsvResults,
table: generateTableResults,
};

this.spinner.start(`Generating ${format}...`);
results = formatFunctions[format](ruleResults);
results = resultFormatters[format](ruleResults);
this.spinner.stop();

await readConfigFile();
Expand All @@ -69,6 +69,7 @@ export default class MetalintRun extends SfCommand<MetalintRunResult> {
}
}

// TODO move elsewhere?
function executeRules(ruleIdsToRun: string[], files: string[]): RuleResults {
const ruleClasses = rulesModule as RuleClasses;
const ruleResults: RuleResults = {};
Expand Down

0 comments on commit cd353b3

Please sign in to comment.