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

AZC0004 ensure that method signatures match #9388

Conversation

JonathanCrd
Copy link
Member

@JonathanCrd JonathanCrd commented Nov 14, 2024

Fixes #6845

Currently, the analyzer does not ensure that both equivalent sync and async methods have the same return type and parameters. This PR adds a check for the return type and parameters of both methods to ensure that they match.

@JonathanCrd JonathanCrd self-assigned this Nov 14, 2024
@JonathanCrd
Copy link
Member Author

This PR is in Draft because I haven't test my changes yet.

@JonathanCrd JonathanCrd changed the title AZC0004 ensure that async/sync method return types match AZC0004 ensure that method signatures match Dec 9, 2024
@JonathanCrd JonathanCrd marked this pull request as ready for review December 9, 2024 21:53
Copy link
Member

@jsquire jsquire left a comment

Choose a reason for hiding this comment

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

Please remember to add tests for these changes!

@JonathanCrd JonathanCrd changed the base branch from main to JonathanCrd/dotnet_analyzer_fix_AZC0004_bug December 11, 2024 23:11
@JonathanCrd
Copy link
Member Author

This PR will go to a feature branch in order to test the changes against the Azure SDK for .Net repo.

@JonathanCrd JonathanCrd merged commit 0ed0248 into Azure:JonathanCrd/dotnet_analyzer_fix_AZC0004_bug Dec 11, 2024
10 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.

AZC0004 doesn't warn when sync/async method return types don't match
2 participants