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 some CodeFactor issues #13031

Merged
merged 3 commits into from
May 17, 2024
Merged

Fix some CodeFactor issues #13031

merged 3 commits into from
May 17, 2024

Conversation

yahiheb
Copy link
Collaborator

@yahiheb yahiheb commented May 14, 2024

  1. Compare Count to 0 rather than using Any() for clarity and for performance: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1860
  2. Prefer static HashData method over ComputeHash: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1850

{
using (RunningTasks.RememberWith(ProcessingEvents))
{
// Only go further if we have estimations.
if (fees?.Estimations?.Any() is not true)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Estimations cannot be null and AFAIU fees also.

@yahiheb yahiheb requested review from turbolay and kiminuo May 14, 2024 19:53
@yahiheb yahiheb changed the title Compare 'Count' to 0 rather than using 'Any()' for clarity and for performance Fix some CodeFactor issues May 14, 2024
Copy link
Collaborator

@turbolay turbolay left a comment

Choose a reason for hiding this comment

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

I will merge this after #13016

@csiki2
Copy link
Collaborator

csiki2 commented May 17, 2024

@turbolay please merge this in if possible.
Thanks.

@turbolay turbolay merged commit cd08d57 into WalletWasabi:master May 17, 2024
7 of 8 checks passed
@yahiheb yahiheb deleted the codefactor branch May 17, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants