diff --git a/package.json b/package.json index 0a3ddd1..bf82dca 100644 --- a/package.json +++ b/package.json @@ -213,7 +213,7 @@ }, { "command": "sfca.runApexGuruAnalysisOnSelectedFile", - "when": "sfca.apexGuruEnabled" + "when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/" } ] }, diff --git a/src/apexguru/apex-guru-service.ts b/src/apexguru/apex-guru-service.ts index 78b57ec..ed37aad 100644 --- a/src/apexguru/apex-guru-service.ts +++ b/src/apexguru/apex-guru-service.ts @@ -60,6 +60,7 @@ export async function runApexGuruOnFile(selection: vscode.Uri, runInfo: RunInfo) executedCommand: commandName, duration: (Date.now() - startTime).toString() }); + void vscode.window.showInformationMessage(messages.apexGuru.finishedScan(ruleResult.violations.length)); }); } catch (e) { const errMsg = e instanceof Error ? e.message : e as string; @@ -172,4 +173,4 @@ export type ApexGuruReport = { type: string; value: string; properties: ApexGuruProperty[]; -} \ No newline at end of file +} diff --git a/src/lib/messages.ts b/src/lib/messages.ts index b9968c5..9dd22ba 100644 --- a/src/lib/messages.ts +++ b/src/lib/messages.ts @@ -22,7 +22,8 @@ export const messages = { apexGuru: { progress: { message: "Code Analyzer running ApexGuru analysis." - } + }, + finishedScan: (violationCount: number) => `Scan complete. ${violationCount} violations found.` }, info: { finishedScan: (scannedCount: number, badFileCount: number, violationCount: number) => `Scan complete. Analyzed ${scannedCount} files. ${violationCount} violations found in ${badFileCount} files.`