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

Refactor following intellicode suggestions #207

Merged
merged 45 commits into from
Jan 9, 2024

Conversation

tkawae
Copy link
Collaborator

@tkawae tkawae commented Jan 8, 2024

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

The source code was refactored according to IntelliCode suggestions. The following points proposed in the issue #206 have been fixed.

  • CA1822: Mark members as static
  • CA1860: Avoid using 'Enumerable.Any()' extension method
  • Null check can be simplified (IDE0270)

In addition, the following points have also been corrected.

  • CA1841: Prefer Dictionary Contains methods
  • CA1854: Prefer the IDictionary.TryGetValue(TKey, out TValue) method
  • CA1510: Use ArgumentNullException throw helper
  • Use conditional expression for return (IDE0046)
  • Simplify conditional expression (IDE0075)

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview?tabs=net-8

Related Tickets & Documents

Added/updated tests?

  • Yes
  • No, and this is why: Current test will cover use cases.
  • I need help with writing tests

@tkawae tkawae requested a review from tomohisa January 8, 2024 10:47
@tkawae tkawae linked an issue Jan 8, 2024 that may be closed by this pull request
tomohisa
tomohisa previously approved these changes Jan 8, 2024
Copy link
Contributor

@tomohisa tomohisa 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. Thanks!

Copy link

sonarqubecloud bot commented Jan 9, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
No data about Coverage
2.2% Duplication on New Code

See analysis details on SonarCloud

@tomohisa
Copy link
Contributor

tomohisa commented Jan 9, 2024

Thanks for the refactoring !

@tomohisa tomohisa merged commit 28905c4 into main Jan 9, 2024
8 checks passed
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.

Refactoring following IntelliCode suggestions
2 participants