Skip to content

Update SKILL.md with additional code style guidelines - #12953

Merged
gewarren merged 3 commits into
mainfrom
gewarren-patch-4
Aug 8, 2026
Merged

Update SKILL.md with additional code style guidelines#12953
gewarren merged 3 commits into
mainfrom
gewarren-patch-4

Conversation

@gewarren

@gewarren gewarren commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Clarify guidelines on string interpolation and expression-bodied members.

Contributes to #12713.

Clarify guidelines on string interpolation and expression-bodied members.
Copilot AI review requested due to automatic review settings August 7, 2026 17:14
@gewarren
gewarren requested a review from a team as a code owner August 7, 2026 17:14
@gewarren
gewarren requested review from BillWagner and adegeo August 7, 2026 17:14
@gewarren
gewarren enabled auto-merge (squash) August 7, 2026 17:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the dotnet-snippet-modernization agent skill documentation to clarify when to prefer string interpolation vs. composite formatting, and how to format expression-bodied members for readability, aligning snippet modernization with repository formatting expectations.

Changes:

  • Adds guidance to avoid string interpolation when it would reduce readability (with an illustrative example).
  • Clarifies formatting guidance for long expression-bodied members (with an example).
  • Adds an explicit curly-braces formatting guideline.
Suppressed comments (1)

.agents/skills/dotnet-snippet-modernization/SKILL.md:39

  • This bullet uses "for example" twice in the same sentence, which reads awkwardly. Removing the second usage keeps the guidance clearer.
- Use expression-bodied members for simple single-expression members. If the line gets too long, for example, a method signature with a type parameter constraint, place the expression body on a new line, for example:

Comment thread .agents/skills/dotnet-snippet-modernization/SKILL.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread .agents/skills/dotnet-snippet-modernization/SKILL.md Outdated

@wadepickett wadepickett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gewarren, approved. Looks good.

@gewarren
gewarren merged commit b44e1b6 into main Aug 8, 2026
7 checks passed
@gewarren
gewarren deleted the gewarren-patch-4 branch August 8, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants