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

Improve MethodParameterLookup #6862

Open
Tim-Pohlmann opened this issue Mar 6, 2023 · 0 comments
Open

Improve MethodParameterLookup #6862

Tim-Pohlmann opened this issue Mar 6, 2023 · 0 comments
Labels
Area: C# C# rules related issues. Type: Cleanup Improve and cleanup code base

Comments

@Tim-Pohlmann
Copy link
Contributor

Things to improve in regards to MethodParameterLookup:

  • Creation happens via constructors and factory methods, should be stream lined to only factory methods.
  • TryGetSyntax takes a IParameterSymbol turns it into a string to then lookup the symbol again. It should be possible to simplify this.
  • A string parameterName overload exists for TryGetSyntax but not for TryGetNonParamsSyntax.
  • Tests are very hard to extend. Might be worthwhile to change the format.
  • It does not support Extension Methods, which would be very useful.
@Tim-Pohlmann Tim-Pohlmann added Type: Improvement Area: C# C# rules related issues. labels Mar 6, 2023
@pavel-mikula-sonarsource pavel-mikula-sonarsource added Type: Cleanup Improve and cleanup code base and removed Type: Improvement labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Type: Cleanup Improve and cleanup code base
Projects
None yet
Development

No branches or pull requests

2 participants