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

Rename EquivalencyAssertionOptions to EquivalencyOptions #2414

Conversation

vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Oct 29, 2023

While working on #2413 I stumbled over this code comment to rename EquivalencyAssertionOptions to EquivalencyOptions. As we are currently working on the next major version, I thought it a good time to implement it.

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

@vbreuss vbreuss changed the title Rename EquivalencyAssertionOptions to EquivalencyOptions Rename EquivalencyAssertionOptions to EquivalencyOptions Oct 29, 2023
@vbreuss vbreuss marked this pull request as ready for review October 29, 2023 13:45
@github-actions
Copy link

github-actions bot commented Oct 29, 2023

Qodana for .NET

5 new problems were found

Inspection name Severity Problems
Use preferred body style (convert into property, indexer, or event with preferred body style) ◽️ Notice 5

💡 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

@vbreuss vbreuss force-pushed the topic/rename-equivalencyassertionoptions branch from aee9846 to 005f78a Compare October 30, 2023 15:18
@dennisdoomen
Copy link
Member

While working on #2413 I stumbled over this code comment to rename EquivalencyAssertionOptions to EquivalencyOptions. As we are currently working on the next major version, I thought it a good time to implement it.

I'm all for this change, but I suspect @jnyrup may have a different perspective on breaking changes like these.

@jnyrup
Copy link
Member

jnyrup commented Oct 30, 2023

I'm all for this change, but I suspect @jnyrup may have a different perspective on breaking changes like these.

You read me like an open book.

As we are currently working on the next major version, I thought it a good time to implement it.

To extend on this, I'm quite conservative when it comes to breaking changes, even between major versions.

I do agree that the new name is better, but I don't think the change pull it's own weight.
grep.app
dotnet tests
datadog tracer tests
FluentAssertions.Json/JsonAssertionOptions.cs
Stack Overflow

If I should try being a tiny bit pragmatic for once:
#2253 might also re-arrange (read break) a lot of things.
If that happens, I guess we have broken extensibility enough that we might as well break this one.

@vbreuss
Copy link
Contributor Author

vbreuss commented Oct 31, 2023

I'm quite conservative when it comes to breaking changes, even between major versions.

As a user of this library, I am often glad about this approach, as it simplifies updates.

Should I leave the pull request open for now and wait for #2253?

As an alternative, if you prefer to not rename the classes at all, I could also just remove the code comment.

@dennisdoomen
Copy link
Member

#2253 might also re-arrange (read break) a lot of things.

It will. As I have it envisioned in my brain, it will be big time breaking change ;-)

Copy link
Member

@jnyrup jnyrup left a comment

Choose a reason for hiding this comment

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

#2413 will also cause a related breaking change by adding members to the public interface IEquivalencyAssertionOptions.

Let's do this 🚀

docs/_pages/releases.md Outdated Show resolved Hide resolved
@vbreuss vbreuss force-pushed the topic/rename-equivalencyassertionoptions branch from 005f78a to ee7b7e5 Compare November 4, 2023 14:28
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6755429589

  • 38 of 39 (97.44%) changed or added relevant lines in 14 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.393%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Src/FluentAssertions/Equivalency/EquivalencyOptions.cs 3 4 75.0%
Totals Coverage Status
Change from base Build 6754534983: 0.0%
Covered Lines: 11735
Relevant Lines: 11926

💛 - Coveralls

@IT-VBFK
Copy link
Contributor

IT-VBFK commented Nov 4, 2023

What is wrong with the qodana scan? 🤔

@vbreuss
Copy link
Contributor Author

vbreuss commented Nov 4, 2023

What is wrong with the qodana scan? 🤔

I am not sure. I had similar problems with in #2431...

@IT-VBFK
Copy link
Contributor

IT-VBFK commented Nov 4, 2023

IMHO it has nothing to do with the code itself?

@jnyrup jnyrup merged commit 57d8ea1 into fluentassertions:develop Nov 4, 2023
5 checks passed
@dennisdoomen
Copy link
Member

I think we need to look at that Qodana rule

@vbreuss vbreuss deleted the topic/rename-equivalencyassertionoptions branch November 4, 2023 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants