Skip to content

Document ArgumentNullException on IsEmpty<T> and use named arg in example#85

Merged
Chris-Wolfgang merged 1 commit intomainfrom
fix/rcs1140-isempty-exception-doc
May 4, 2026
Merged

Document ArgumentNullException on IsEmpty<T> and use named arg in example#85
Chris-Wolfgang merged 1 commit intomainfrom
fix/rcs1140-isempty-exception-doc

Conversation

@Chris-Wolfgang
Copy link
Copy Markdown
Owner

Summary

Two small fixes that together unblock the open analyzer-bump PRs (#83 Meziantou, #84 SonarAnalyzer) and resolve the failing build on `main`.

1. RCS1140 in `IEnumerableExtensions.cs:73`

`IsEmpty` throws `ArgumentNullException` but the XML doc lacked the `` tag. Added it, matching the pattern used by every other throwing method in this file (`ForEach`, `None`, `Do`, `Shuffle`).

2. MA0003 in `examples/IsNullOrEmpty.Example/Program.cs:23`

A latent error that was masked by RCS1140 stopping the build first. Changed `ProcessOrders(null)` → `ProcessOrders(orders: null)` to make the literal-null argument explicit.

Test plan

🤖 Generated with Claude Code

…mple

Two CI fixes that together unblock the analyzer-bump PRs (#83 + #84) and main:

- IEnumerableExtensions.cs:73 — IsEmpty<T> throws ArgumentNullException but
  was missing the <exception> doc tag (RCS1140). Added the tag matching the
  pattern used by every other throwing method in the file.
- examples/IsNullOrEmpty.Example/Program.cs:23 — call to ProcessOrders(null)
  now uses a named argument (MA0003). This was a latent error masked by the
  earlier RCS1140 build failure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 4, 2026 00:32
Copy link
Copy Markdown
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

Fixes analyzer warnings on main by aligning XML docs with actual exceptions thrown and clarifying a null argument in an example project.

Changes:

  • Documented ArgumentNullException for IsEmpty<T> via an XML <exception> tag.
  • Updated example usage to pass null with an explicit named argument (orders: null) to satisfy analyzer rules.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Wolfgang.Extensions.IEnumerable/IEnumerableExtensions.cs Adds missing XML exception documentation for IsEmpty<T> to match existing patterns and satisfy analyzers.
examples/IsNullOrEmpty.Example/Program.cs Makes the null argument explicit with a named parameter in the example call site.

@Chris-Wolfgang Chris-Wolfgang merged commit 09073dd into main May 4, 2026
12 checks passed
@Chris-Wolfgang Chris-Wolfgang deleted the fix/rcs1140-isempty-exception-doc branch May 4, 2026 00:50
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.

2 participants