From e4545834c2cb7157c208237e527a3f4b663842d6 Mon Sep 17 00:00:00 2001 From: Jagadeeswaran Jayaprakash <58611665+jag-j@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:24:12 -0700 Subject: [PATCH] FIX (Extension) @W-16002080@ Add eslint support and additional parameters for the scan - Update doc reviewed text (#97) --- package.json | 6 +++--- src/lib/scanner.ts | 2 +- src/test/suite/scanner.test.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index fcf01f2..d8726e5 100644 --- a/package.json +++ b/package.json @@ -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." } } }, diff --git a/src/lib/scanner.ts b/src/lib/scanner.ts index 83e8021..e2f7cba 100644 --- a/src/lib/scanner.ts +++ b/src/lib/scanner.ts @@ -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[] = [ diff --git a/src/test/suite/scanner.test.ts b/src/test/suite/scanner.test.ts index a9d86a7..a959aab 100644 --- a/src/test/suite/scanner.test.ts +++ b/src/test/suite/scanner.test.ts @@ -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 () => { @@ -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.'); }); });