Code cleanup, some from compiler messages, some from R# inspections. …#1152
Merged
SeanKilleen merged 1 commit intomasterfrom Mar 16, 2026
Merged
Code cleanup, some from compiler messages, some from R# inspections. …#1152SeanKilleen merged 1 commit intomasterfrom
SeanKilleen merged 1 commit intomasterfrom
Conversation
…Some just modernization.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the docs/snippets C# examples to use more modern C# syntax and performs small cleanups to keep the documentation snippets concise and current.
Changes:
- Modernize array/list-like initializations using collection expressions / simplified array creation.
- Minor snippet refactors/cleanups (unused
usingremovals, simplified conditional assignment, visibility tweak). - Small doc/snippet wording and settings updates.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/snippets/Snippets.sln.DotSettings | Adds a JetBrains/Rider/ReSharper settings dictionary entry for snippet spellchecking. |
| docs/snippets/Snippets.NUnitLite/UnitTest1.cs | Uses a method group instead of a lambda for an exception assertion example. |
| docs/snippets/Snippets.NUnit/TestCaseSourceExamples.cs | Uses collection expressions for test case arrays and adjusts a test case source helper method’s visibility. |
| docs/snippets/Snippets.NUnit/TestCaseDataExample.cs | Uses collection expressions for TypeArgs assignment in TestCaseData examples. |
| docs/snippets/Snippets.NUnit/CustomConstraints.cs | Removes an unused using directive. |
| docs/snippets/Snippets.NUnit/ClassicVsConstraintAssertions.cs | Uses collection expression syntax for an int[] example. |
| docs/snippets/Snippets.NUnit/ClassicAssertExamples.cs | Simplifies array creation with implicit typing (new[]). |
| docs/snippets/Snippets.NUnit/Attributes/TestFixtureSourceAttributeExamples.cs | Uses collection expressions for FixtureArgs arrays. |
| docs/snippets/Snippets.NUnit/Attributes/TestFixtureAttributeExamples.cs | Simplifies assignment logic and modernizes TypeArgs attribute syntax. |
| docs/snippets/Snippets.NUnit/Attributes/RetryAttributeExamples.cs | Removes an unused using directive. |
| docs/snippets/Snippets.NUnit/Attributes/RepeatAttributeExample.cs | Removes unused using directives and redundant field initializers. |
| docs/snippets/Snippets.NUnit/Attributes/CancelAfterAttributeExamples.cs | Uses a collection expression for a test case source value list. |
| docs/snippets/Snippets.NUnit/AttributeExamples.cs | Minor wording tweak inside the timeout/obsolete-warning snippet area. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
SeanKilleen
approved these changes
Mar 16, 2026
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.
…Some just modernization.