-
Notifications
You must be signed in to change notification settings - Fork 395
New function: Show-RuleHelp #730
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
Comments
@juneb This looks like a very useful addition. I would like to propose a slightly different approach though - perhaps we can add a switch to |
No, I wouldn't do it that way. The philosophy of PowerShell is small, single-feature commands. That's why we created Get-Command separate from Get-Help. Instead, I made the Name parameter take value from pipeline, so you can pipe Get-ScriptAnalyzerRule to Get-RuleHelp. I also made sure that the parameter names/types were the same. But, it's your module, so I'm fine with whatever you decide. |
I agree with the philosophy but I don't think Would like to loop in @joeyaiello here to add more perspective, because I think adding a new cmdlet to the module warrants more discussion. |
First, looks super cool, I could definitely see this being useful to people. On to the design. I understand both points of view. Here's my thinking:
What are everyone's thoughts on packing rule documentation with each module release? |
@joeyaiello shipping rule documentation sounds like a great idea as it would prevent the issues (hitting the web and potential doc version mismatch) that you've mentioned. And if we ship the rule documentation then it is relatively straightforward to include the documentation as a property of |
Yep, I like that approach as well. A baked-in snapshot of the documentation will be a lot more useful to the user. |
Agreed. This also solves the problem of finding online docs for custom rules. |
The downside is that we need to design, implement, and test a rule documentation format, which can take a while. (I suggest that we start with something very simple like a .md template like the ones already in use.) Then, we need to find a way to install and update the rule doc files. Deja vu... |
I have a function to submit, Show-RuleHelp, which opens the .md file of help for each rule. Before I do a PR, I want to know if you're interested in including it and, if so, how?
-- Add the script containing the function to ScriptsToProcess
-- Add the function to PSScriptAnalyzer.psm1 + FunctionsToExport in the psd1
You can see the code at https://github.com/juneb/Development/blob/master/Show-RuleHelp.ps1.
The text was updated successfully, but these errors were encountered: