Skip to content

Enable nullable in project but disable in files#117

Merged
twogood merged 1 commit intomainfrom
nullable-enable-start-Activout.RestClient
Oct 24, 2025
Merged

Enable nullable in project but disable in files#117
twogood merged 1 commit intomainfrom
nullable-enable-start-Activout.RestClient

Conversation

@twogood
Copy link
Owner

@twogood twogood commented Oct 24, 2025

Summary by CodeRabbit

  • Refactor
    • Internal code quality improvements across the project with no impact on user-facing functionality or behavior.

@twogood twogood self-assigned this Oct 24, 2025
@twogood twogood enabled auto-merge (rebase) October 24, 2025 20:04
@coderabbitai
Copy link

coderabbitai bot commented Oct 24, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The project enables nullable reference types globally via the .csproj file and then disables nullable context for all C# source files using #nullable disable directives, preserving existing runtime behavior while adjusting compiler analysis scope.

Changes

Cohort / File(s) Summary
Project Configuration
Activout.RestClient.csproj
Enabled nullable reference types project-wide by adding <Nullable>enable</Nullable>
Domain Exception Handling
DomainExceptions/AbstractDomainExceptionMapper.cs, DomainExceptions/DefaultDomainExceptionMapper.cs, DomainExceptions/DefaultDomainExceptionMapperFactory.cs, DomainExceptions/DomainErrorAttribute.cs, DomainExceptions/DomainExceptionAttribute.cs, DomainExceptions/DomainHttpErrorAttribute.cs, DomainExceptions/IDomainExceptionMapper.cs, DomainExceptions/IDomainExceptionMapperFactory.cs
Added #nullable disable directive to each file
Attribute Classes
AcceptAttribute.cs, ContentTypeAttribute.cs, ErrorResponseAttribute.cs, FormKeyAttribute.cs, FormParamAttribute.cs, HeaderAttribute.cs, HeaderParamAttribute.cs, HttpMethodAttribute.cs, NamedParamAttribute.cs, PartParamAttribute.cs, PathAttribute.cs, PathParamAttribute.cs, QueryParamAttribute.cs, RouteAttribute.cs, RouteParamAttribute.cs, TemplateAttribute.cs
Added #nullable disable directive to each file
Helper Interfaces & Implementations
Helpers/IDuckTyping.cs, Helpers/ITaskConverter.cs, Helpers/ITaskConverterFactory.cs, Helpers/Implementation/DuckTyping.cs, Helpers/Implementation/TaskConverter.cs, Helpers/Implementation/TaskConverter2.cs, Helpers/Implementation/TaskConverter2Factory.cs, Helpers/Implementation/TaskConverter3.cs, Helpers/Implementation/TaskConverter3Factory.cs, Helpers/Implementation/TaskConverterFactory.cs
Added #nullable disable directive to each file
Core REST Client Implementation
Implementation/HeaderListExtensions.cs, Implementation/RequestHandler.cs, Implementation/RestClient.cs, Implementation/RestClientBuilder.cs, Implementation/RestClientContext.cs, Implementation/RestClientFactory.cs, Implementation/StringExtensions.cs, IRequestLogger.cs, IRestClientBuilder.cs, IRestClientFactory.cs, RestClientBuilderExtensions.cs, RestClientException.cs
Added #nullable disable directive to each file
Parameter Conversion
ParamConverter/IParamConverter.cs, ParamConverter/IParamConverterManager.cs, ParamConverter/Implementation/DateTimeEpochParamConverter.cs, ParamConverter/Implementation/DateTimeIso8601ParamConverter.cs, ParamConverter/Implementation/ParamConverterManager.cs, ParamConverter/Implementation/ToStringParamConverter.cs
Added #nullable disable directive to each file
Serialization
Serialization/IDeserializer.cs, Serialization/ISerializationManager.cs, Serialization/ISerializer.cs, Serialization/Implementation/ByteArrayDeserializer.cs, Serialization/Implementation/ByteArraySerializer.cs, Serialization/Implementation/FormUrlEncodedSerializer.cs, Serialization/Implementation/SerializationManager.cs, Serialization/Implementation/StringDeserializer.cs, Serialization/Implementation/StringSerializer.cs
Added #nullable disable directive to each file
Utility Classes
MediaType.cs, Part.cs, Services.cs
Added #nullable disable directive to each file

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

The changes are repetitive and consistent—each file receives only a #nullable disable directive with no logic modifications. Review effort is minimal, though understanding the overall strategy of enabling nullable types globally while opting out per-file warrants brief attention.

Poem

🐰 A bunny's note on nulls and safety checks so fine:
We've turned up null-awareness, then turned down each line,
With directives aplenty, now the compiler won't complain,
Yet logic flows unchanged—our code remains the same!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nullable-enable-start-Activout.RestClient

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 57e6aa9 and 793097a.

📒 Files selected for processing (65)
  • Activout.RestClient/AcceptAttribute.cs (1 hunks)
  • Activout.RestClient/Activout.RestClient.csproj (1 hunks)
  • Activout.RestClient/ContentTypeAttribute.cs (1 hunks)
  • Activout.RestClient/DomainExceptions/AbstractDomainExceptionMapper.cs (1 hunks)
  • Activout.RestClient/DomainExceptions/DefaultDomainExceptionMapper.cs (1 hunks)
  • Activout.RestClient/DomainExceptions/DefaultDomainExceptionMapperFactory.cs (1 hunks)
  • Activout.RestClient/DomainExceptions/DomainErrorAttribute.cs (1 hunks)
  • Activout.RestClient/DomainExceptions/DomainExceptionAttribute.cs (1 hunks)
  • Activout.RestClient/DomainExceptions/DomainHttpErrorAttribute.cs (1 hunks)
  • Activout.RestClient/DomainExceptions/IDomainExceptionMapper.cs (1 hunks)
  • Activout.RestClient/DomainExceptions/IDomainExceptionMapperFactory.cs (1 hunks)
  • Activout.RestClient/ErrorResponseAttribute.cs (1 hunks)
  • Activout.RestClient/FormKeyAttribute.cs (1 hunks)
  • Activout.RestClient/FormParamAttribute.cs (1 hunks)
  • Activout.RestClient/HeaderAttribute.cs (1 hunks)
  • Activout.RestClient/HeaderParamAttribute.cs (1 hunks)
  • Activout.RestClient/Helpers/IDuckTyping.cs (1 hunks)
  • Activout.RestClient/Helpers/ITaskConverter.cs (1 hunks)
  • Activout.RestClient/Helpers/ITaskConverterFactory.cs (1 hunks)
  • Activout.RestClient/Helpers/Implementation/DuckTyping.cs (1 hunks)
  • Activout.RestClient/Helpers/Implementation/TaskConverter.cs (1 hunks)
  • Activout.RestClient/Helpers/Implementation/TaskConverter2.cs (1 hunks)
  • Activout.RestClient/Helpers/Implementation/TaskConverter2Factory.cs (1 hunks)
  • Activout.RestClient/Helpers/Implementation/TaskConverter3.cs (1 hunks)
  • Activout.RestClient/Helpers/Implementation/TaskConverter3Factory.cs (1 hunks)
  • Activout.RestClient/Helpers/Implementation/TaskConverterFactory.cs (1 hunks)
  • Activout.RestClient/HttpMethodAttribute.cs (1 hunks)
  • Activout.RestClient/IRequestLogger.cs (1 hunks)
  • Activout.RestClient/IRestClientBuilder.cs (1 hunks)
  • Activout.RestClient/IRestClientFactory.cs (1 hunks)
  • Activout.RestClient/Implementation/HeaderListExtensions.cs (1 hunks)
  • Activout.RestClient/Implementation/RequestHandler.cs (1 hunks)
  • Activout.RestClient/Implementation/RestClient.cs (1 hunks)
  • Activout.RestClient/Implementation/RestClientBuilder.cs (1 hunks)
  • Activout.RestClient/Implementation/RestClientContext.cs (1 hunks)
  • Activout.RestClient/Implementation/RestClientFactory.cs (1 hunks)
  • Activout.RestClient/Implementation/StringExtensions.cs (1 hunks)
  • Activout.RestClient/MediaType.cs (1 hunks)
  • Activout.RestClient/NamedParamAttribute.cs (1 hunks)
  • Activout.RestClient/ParamConverter/IParamConverter.cs (1 hunks)
  • Activout.RestClient/ParamConverter/IParamConverterManager.cs (1 hunks)
  • Activout.RestClient/ParamConverter/Implementation/DateTimeEpochParamConverter.cs (1 hunks)
  • Activout.RestClient/ParamConverter/Implementation/DateTimeIso8601ParamConverter.cs (1 hunks)
  • Activout.RestClient/ParamConverter/Implementation/ParamConverterManager.cs (1 hunks)
  • Activout.RestClient/ParamConverter/Implementation/ToStringParamConverter.cs (1 hunks)
  • Activout.RestClient/Part.cs (1 hunks)
  • Activout.RestClient/PartParamAttribute.cs (1 hunks)
  • Activout.RestClient/PathAttribute.cs (1 hunks)
  • Activout.RestClient/PathParamAttribute.cs (1 hunks)
  • Activout.RestClient/QueryParamAttribute.cs (1 hunks)
  • Activout.RestClient/RestClientBuilderExtensions.cs (1 hunks)
  • Activout.RestClient/RestClientException.cs (1 hunks)
  • Activout.RestClient/RouteAttribute.cs (1 hunks)
  • Activout.RestClient/RouteParamAttribute.cs (1 hunks)
  • Activout.RestClient/Serialization/IDeserializer.cs (1 hunks)
  • Activout.RestClient/Serialization/ISerializationManager.cs (1 hunks)
  • Activout.RestClient/Serialization/ISerializer.cs (1 hunks)
  • Activout.RestClient/Serialization/Implementation/ByteArrayDeserializer.cs (1 hunks)
  • Activout.RestClient/Serialization/Implementation/ByteArraySerializer.cs (1 hunks)
  • Activout.RestClient/Serialization/Implementation/FormUrlEncodedSerializer.cs (1 hunks)
  • Activout.RestClient/Serialization/Implementation/SerializationManager.cs (1 hunks)
  • Activout.RestClient/Serialization/Implementation/StringDeserializer.cs (1 hunks)
  • Activout.RestClient/Serialization/Implementation/StringSerializer.cs (1 hunks)
  • Activout.RestClient/Services.cs (1 hunks)
  • Activout.RestClient/TemplateAttribute.cs (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@twogood twogood merged commit 76f5811 into main Oct 24, 2025
8 of 9 checks passed
@twogood twogood deleted the nullable-enable-start-Activout.RestClient branch October 24, 2025 20:05
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.

1 participant