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

Update PSScriptAnalyzer rule documentation to docs.microsoft.com #3610

Closed
2 tasks done
andyleejordan opened this issue Oct 8, 2021 · 2 comments · Fixed by #3642
Closed
2 tasks done

Update PSScriptAnalyzer rule documentation to docs.microsoft.com #3610

andyleejordan opened this issue Oct 8, 2021 · 2 comments · Fixed by #3642
Assignees
Labels
Area-Script Analysis Issue-Enhancement A feature request (enhancement).

Comments

@andyleejordan
Copy link
Member

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.

Summary

The PSScriptAnalyzer documentation will soon be published at docs.microsoft.com, so we can update this URI:

const pssaDocBaseURL = "https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules";

to point there when it happens.

Proposed Design

No response

@andyleejordan andyleejordan added the Issue-Enhancement A feature request (enhancement). label Oct 8, 2021
@andyleejordan
Copy link
Member Author

andyleejordan commented Oct 8, 2021

This will unfortunately be a little more involved than just using a redirect link, looking at this code:

public showRuleDocumentation(ruleId: string) {
const pssaDocBaseURL = "https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules";
if (!ruleId) {
this.log.writeWarning("Cannot show documentation for code action, no ruleName was supplied.");
return;
}
if (ruleId.startsWith("PS")) {
ruleId = ruleId.substr(2);
}
vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(pssaDocBaseURL + `/${ruleId}.md`));
}
}

as we won't be pointing to .md links any more.

@sdwheeler
Copy link
Contributor

#3608 should fix this. When the docs are live on docs.microsoft.com we can change the base URL to point to the docs path and just append the ruleId without the .md extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Script Analysis Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants