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

Add [StringSyntax("CompositeFormat")] to all "because" parameters #2635

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

psychotoad
Copy link

@psychotoad psychotoad commented May 7, 2024

Implements #2630

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

@coveralls
Copy link

coveralls commented May 9, 2024

Pull Request Test Coverage Report for Build 9330038889

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 7 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.005%) to 97.566%

Files with Coverage Reduction New Missed Lines %
Src/FluentAssertions/Events/EventMonitor.cs 2 95.79%
Totals Coverage Status
Change from base Build 8882705409: 0.005%
Covered Lines: 12055
Relevant Lines: 12239

💛 - 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.

For some reason the Qodana scan failed.

@dennisdoomen dennisdoomen requested a review from jnyrup May 10, 2024 17:16
@psychotoad
Copy link
Author

I don't really understand what is wrong or what I am supposed to do.

@dennisdoomen
Copy link
Member

I don't really understand what is wrong or what I am supposed to do.

It doesn't seem to be related to your changes. We're investigating it.

@ITaluone
Copy link
Contributor

@psychotoad try rebase onto current develop and force push

@dennisdoomen
Copy link
Member

It doesn't seem to be related to your changes. We're investigating it.

It is caused by Qodana. JetBrains is working on a fix already.

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.

Looks good!
If you search for these two regexes, I found ~30 more more places to add it.

  • [\(,][ \r\n]*string [a-zA-Z]+,[ \r\n]+(params )?object\[
  • [\(,][ \r\n]*string because

Except MessageBuilder.Build (as it may contain {reason}), IAssertionScope.WithExpectation, IAssertionScope.FailWith and their implementations

Copy link

github-actions bot commented May 30, 2024

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@psychotoad
Copy link
Author

Qodana now shows "String formatting method problems" in the tests. How do I disable these checks in the tests?

@ITaluone
Copy link
Contributor

ITaluone commented May 31, 2024

You could add

- name: FormatStringProblem
  paths:
    - Tests

to qodana.yml (root directory) if you want to disable it completely for the given paths

OR

add // ReSharper disable once FormatStringProblem before every occurrence

@ITaluone
Copy link
Contributor

Huh.. thats weird..

can you try the other method?

@psychotoad
Copy link
Author

Wait, now only 4 out of 5 warnings got ignored?

@dennisdoomen
Copy link
Member

add // ReSharper disable once FormatStringProblem before every occurrence

This should work.

@psychotoad
Copy link
Author

add // ReSharper disable once FormatStringProblem before every occurrence

This should work.

For some reason it did not in one place. I solved it with with disable + restore.

@IT-VBFK
Copy link
Contributor

IT-VBFK commented Jun 1, 2024

Have you noticed the compile error in last pipeline run?

https://github.com/fluentassertions/fluentassertions/actions/runs/9318831327/job/25663184462

@psychotoad
Copy link
Author

Have you noticed the compile error in last pipeline run?

https://github.com/fluentassertions/fluentassertions/actions/runs/9318831327/job/25663184462

Thanks for notifying me.

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.

None yet

6 participants