Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX (Extension) @W-16002080@ Add eslint support and additional parameters for the scan - Update doc reviewed text #97

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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