Add rule template and documentation - #2215
Merged
Mikey Lombardi (He/Him) (michaeltlombardi) merged 3 commits intoSep 18, 2026
Merged
Mikey Lombardi (He/Him) (michaeltlombardi) merged 3 commits into
Mikey Lombardi (He/Him) (michaeltlombardi) merged 3 commits into
Conversation
Sean Wheeler (sdwheeler)
requested review from
a team and
Mikey Lombardi (He/Him) (michaeltlombardi)
as code owners
September 17, 2026 12:33
Copilot started reviewing on behalf of
Sean Wheeler (sdwheeler)
September 17, 2026 12:34
View session
6 tasks
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The template contains invalid YAML placeholders and heading/link inconsistencies that should be corrected before approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds a reusable PSScriptAnalyzer rule documentation template and authoring guidance.
Changes:
- Defines standard article structure and placeholders.
- Documents required and optional sections.
- Provides configuration, suppression, and example guidance.
File summaries
| File | Summary |
|---|---|
docs/rule-template.md |
Adds the reusable rule documentation template. |
docs/rule-template-docs.md |
Documents how to complete the template. |
Review details
Suppressed comments (4)
docs/rule-template.md:5
- The frontmatter is not valid YAML while the placeholders are present: an unquoted scalar beginning with
{{is parsed as a flow collection and causes frontmatter parsers to fail. Since this is a documentation template, keep the template itself parseable by quoting the placeholder values (and preserve the quotes when authors replace them).
description: {{Brief description of the rule behavior}}
ms.date: {{MM/DD/YYYY}}
ms.topic: reference
title: {{RuleName}}
docs/rule-template.md:40
- This introduces a second top-level examples section immediately after the required
## Example, so anyone copying the template gets a redundant empty section and an inconsistent hierarchy. Keep one## Examplesection and place the scenario heading directly beneath it as the optional additional example structure.
## Examples
### {{Scenario name}}
docs/rule-template.md:73
- The repository's rule articles make
Parametersan H3 under the configuration section and individual settings H4 headings (for example,docs/Rules/PlaceOpenBrace.md:31-45). MakingParametersan H2 and each setting an H3 breaks the documented heading hierarchy and conflicts with the guidance file.
## Parameters
### {{SettingName}}
docs/rule-template.md:95
- This reference link has no definition in this file, and the repository does not contain a
using-scriptanalyzer.mdtarget at the referenced relative path, so every article copied from the template will publish a broken Further reading link. Point this reference to the same Microsoft Learn URL used by the repository README (or add the intended local document).
[02]: ../using-scriptanalyzer.md
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Mikey Lombardi (He/Him) (michaeltlombardi)
approved these changes
Sep 18, 2026
Mikey Lombardi (He/Him) (michaeltlombardi)
merged commit Sep 18, 2026
168dcbd
into
PowerShell:main
4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add rule template and documentation