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

Fix compiler warnings related to nullability in Devices module #495

Merged
merged 276 commits into from
Feb 19, 2024

Conversation

NikolaVetnic
Copy link
Contributor

@NikolaVetnic NikolaVetnic commented Jan 17, 2024

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration tests.
  • I ensured that the PR title is good enough for the changelog.
  • I labeled the PR.

Description

Various code issues and warnings related to null values found using the ReSharper tool in the Devices module were investigated and addressed.

Summary by CodeRabbit

  • New Features

    • Enabled nullable reference types across various modules to enhance code safety and nullability checks.
    • Streamlined logic for database seeding and improved code clarity in several areas.
    • Added checks for the existence of certain objects before proceeding with operations to avoid potential errors.
    • Simplified the creation and handling of DTOs and commands by marking properties as required, ensuring necessary data is provided by consumers.
  • Bug Fixes

    • Corrected a typo and handled nullable types more effectively in command handlers.
    • Fixed method signatures to support nullable reference types, aligning with the enabled nullable context.
    • Removed outdated and commented-out test scenarios, focusing on relevant test cases.
  • Refactor

    • Refined method signatures for transactional operations to improve the handling of database transactions.
    • Updated various command and DTO classes to require certain properties, ensuring critical information is always included.
    • Streamlined the logic in several areas, including database seeding, to improve performance and readability.
  • Chores

    • Removed unnecessary namespace imports and adjusted configuration settings to clean up the codebase.
    • Conditionally added services based on options, improving the modularity and configurability of the system.

@NikolaVetnic NikolaVetnic added the refactoring Refactoring of code label Jan 17, 2024
@NikolaVetnic NikolaVetnic self-assigned this Jan 17, 2024
@NikolaVetnic NikolaVetnic requested a review from tnotheis January 18, 2024 19:23
NikolaVetnic and others added 20 commits January 19, 2024 08:43
refactor: remove nullable mark from the input param as it is never null
…he single call of the method suppresses null warnings
…ty but the properties are then immediately set
Copy link
Member

@tnotheis tnotheis left a comment

Choose a reason for hiding this comment

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

Ah, I need to check one more thing

@tnotheis tnotheis merged commit c05730c into main Feb 19, 2024
14 checks passed
@tnotheis tnotheis deleted the fix-devices-code-issues branch February 19, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants