Skip to content

Code cleanup, some from compiler messages, some from R# inspections. …#1152

Merged
SeanKilleen merged 1 commit intomasterfrom
codecleanup
Mar 16, 2026
Merged

Code cleanup, some from compiler messages, some from R# inspections. …#1152
SeanKilleen merged 1 commit intomasterfrom
codecleanup

Conversation

@OsirisTerje
Copy link
Member

…Some just modernization.

Copilot AI review requested due to automatic review settings March 15, 2026 16:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 using removals, 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 SeanKilleen merged commit 2f15032 into master Mar 16, 2026
11 checks passed
@SeanKilleen SeanKilleen deleted the codecleanup branch March 16, 2026 11:12
github-actions bot pushed a commit that referenced this pull request Mar 16, 2026
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