Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable nullable references in Moq.csproj #1535

Open
wants to merge 92 commits into
base: main
Choose a base branch
from

Conversation

andrewimcclement
Copy link

@andrewimcclement andrewimcclement commented Feb 26, 2025

Aims to resolve #1418 , #1416 .

Does not extend to Moq.Tests.csproj, etc.

Nullable reference issues are enabled as warnings in Moq.csproj. Several issues have been left unresolved, as I lack the knowledge to resolve them correctly at this time (perhaps maintainers can help here, or else it may be acceptable to put this PR down as is and slowly pick off the remaining nullable reference warnings one at a time).

In general I have tried hard to avoid actually changing the code functionality, except where it seemed clear. So several simplifications could be made in follow up PRs.

See the docs for details of the nullability attributes I have used.

…hing ever calls `new Condition(null)` so we can simply rely on nullable annotations, so long as we guard the public interface.
@CLAassistant
Copy link

CLAassistant commented Feb 26, 2025

CLA assistant check
All committers have signed the CLA.

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.

The public API is still missing nullable reference type annotations
2 participants