Skip to content

Commit

Permalink
Point PSScriptAnalyzer rules to published documentation (#3642)
Browse files Browse the repository at this point in the history
Co-authored-by: Andy Schwartzmeyer <[email protected]>
  • Loading branch information
sdwheeler and andyleejordan authored Oct 26, 2021
1 parent c664e25 commit 2b1bd04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/CodeActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class CodeActionsFeature implements vscode.Disposable {
}

public showRuleDocumentation(ruleId: string) {
const pssaDocBaseURL = "https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules";
const pssaDocBaseURL = "https://docs.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/";

if (!ruleId) {
this.log.writeWarning("Cannot show documentation for code action, no ruleName was supplied.");
Expand All @@ -45,6 +45,6 @@ export class CodeActionsFeature implements vscode.Disposable {
ruleId = ruleId.substr(2);
}

vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(pssaDocBaseURL + `/${ruleId}.md`));
vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(pssaDocBaseURL + `${ruleId}`));
}
}

0 comments on commit 2b1bd04

Please sign in to comment.