Skip to content

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Nov 9, 2023

Fix issue detected by ReSharper:

  • Possible 'null' assignment to non-nullable entity

IMPORTANT

  • If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used in these tests.
  • If the PR adds a feature or fixes a bug, please update the release notes with a functional description that explains what the change means to consumers of this library, which are published on the website.
  • If the PR changes the public API the changes needs to be included by running AcceptApiChanges.ps1 or AcceptApiChanges.sh.
  • If the PR affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
    • Please also run ./build.sh --target spellcheck or .\build.ps1 --target spellcheck before pushing and check the good outcome

@github-actions
Copy link

github-actions bot commented Nov 9, 2023

Qodana for .NET

2 new problems were found

Inspection name Severity Problems
Conditional access qualifier expression is known to be null or not null 🔶 Warning 1
'??' condition is known to be null or not null 🔶 Warning 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2023.2.8
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@coveralls
Copy link

coveralls commented Nov 9, 2023

Pull Request Test Coverage Report for Build 6823042175

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 97.462%

Totals Coverage Status
Change from base Build 6801258828: 0.02%
Covered Lines: 11739
Relevant Lines: 11924

💛 - Coveralls

Copy link
Member

@dennisdoomen dennisdoomen left a comment

Choose a reason for hiding this comment

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

🙃 (nitpick) I'd prefer more functional commit titles.

@dennisdoomen dennisdoomen requested a review from jnyrup November 9, 2023 09:46
@vbreuss
Copy link
Contributor Author

vbreuss commented Nov 9, 2023

🙃 (nitpick) I'd prefer more functional commit titles.

I split the pull request in two. This one now only updates the CallerIdentifier and the consolidation of namespace and file location is moved to #2449.

@vbreuss vbreuss changed the title Fix ReSharper issues Avoid possible 'null' assignment in CallerIdentifier Nov 9, 2023
@dennisdoomen
Copy link
Member

I split the pull request in two. This one now only updates the CallerIdentifier and the consolidation of namespace and file location is moved to #2449.

It could have been two separate commits. But all commits and PR titles need to be as functional as possible.

@dennisdoomen
Copy link
Member

What about the Qodana issues?

@vbreuss
Copy link
Contributor Author

vbreuss commented Nov 17, 2023

What about the Qodana issues?

The two issues in the comment are from an older run before commit 2caaf39.
That's why I introduced the #if !NET6_0_OR_GREATER condition.

I don't know, why the comment was not updated 😕

@jnyrup jnyrup merged commit 4dc9e5d into fluentassertions:develop Nov 17, 2023
@vbreuss vbreuss deleted the topic/fix-resharper-issues branch November 17, 2023 12:34
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
…ons#2448)

* Fix "Possible 'null' assignment to non-nullable entity"

* Add null check only when not NET6 or greater
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
…ons#2448)

* Fix "Possible 'null' assignment to non-nullable entity"

* Add null check only when not NET6 or greater
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
…ons#2448)

* Fix "Possible 'null' assignment to non-nullable entity"

* Add null check only when not NET6 or greater
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Aug 18, 2024
…ons#2448)

* Fix "Possible 'null' assignment to non-nullable entity"

* Add null check only when not NET6 or greater
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Aug 18, 2024
…ons#2448)

* Fix "Possible 'null' assignment to non-nullable entity"

* Add null check only when not NET6 or greater
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Aug 24, 2024
…ons#2448)

* Fix "Possible 'null' assignment to non-nullable entity"

* Add null check only when not NET6 or greater
jnyrup pushed a commit that referenced this pull request Sep 9, 2024
* Fix "Possible 'null' assignment to non-nullable entity"

* Add null check only when not NET6 or greater
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.

5 participants