Skip to content

Commit

Permalink
FIX (Extension) @W-16002080@ Add eslint support and additional parame…
Browse files Browse the repository at this point in the history
…ters for the scan - Update doc reviewed text (#97)
  • Loading branch information
jag-j committed Jun 24, 2024
1 parent b7b7c79 commit e454583
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,16 @@
"codeAnalyzer.scanner.engines": {
"type": "string",
"default": "pmd,retire-js,eslint-lwc",
"description": "***Specifies the engines to run. Submit multiple values as a comma-separated list. Possible values are pmd, retire-js, eslint, eslint-lwc and eslint-typescript***"
"description": "The engines to run. Specify multiple values as a comma-separated list. Possible values are pmd, retire-js, eslint, eslint-lwc, and eslint-typescript."
},
"codeAnalyzer.normalizeSeverity.enabled": {
"type": "boolean",
"default": false,
"description": "***Enable this flag to output normalized severity and engine-specific severity across all engines.***"
"description": "Output normalized severity (high, moderate, low) and engine-specific severity across all engines."
},
"codeAnalyzer.rules.category": {
"type": "string",
"description": "***One or more categories of rules to run. Specify multiple values as a comma-separated list.***"
"description": "The categories of rules to run. Specify multiple values as a comma-separated list. Run 'sf scanner rule list -e' in the terminal for the list of categories associated with a specific engine."
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class ScanRunner {
const engines = SettingsManager.getEnginesToRun();

if (!engines || engines.length === 0) {
throw new Error('***Engines cannot be empty. Please set one or more engines in the VS Code Settings***');
throw new Error('"Code Analyzer > Scanner: Engines" setting can\'t be empty. Go to your VS Code settings and specify at least one engine, and then try again.');
}

const args: string[] = [
Expand Down
4 changes: 2 additions & 2 deletions src/test/suite/scanner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ suite('ScanRunner', () => {

// ===== ASSERTIONS =====
expect(err).to.exist;
expect(err.message).to.equal('***Engines cannot be empty. Please set one or more engines in the VS Code Settings***');
expect(err.message).to.equal('"Code Analyzer > Scanner: Engines" setting can\'t be empty. Go to your VS Code settings and specify at least one engine, and then try again.');
});

test('Error thrown when codeAnalyzer.scanner.engines is undefined', async () => {
Expand All @@ -130,7 +130,7 @@ suite('ScanRunner', () => {

// ===== ASSERTIONS =====
expect(err).to.exist;
expect(err.message).to.equal('***Engines cannot be empty. Please set one or more engines in the VS Code Settings***');
expect(err.message).to.equal('"Code Analyzer > Scanner: Engines" setting can\'t be empty. Go to your VS Code settings and specify at least one engine, and then try again.');
});
});

Expand Down

0 comments on commit e454583

Please sign in to comment.