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

The parameter name 'xxx' is not declared in the argument list. #682

Closed
nikcio opened this issue Oct 15, 2022 · 0 comments · Fixed by #1033
Closed

The parameter name 'xxx' is not declared in the argument list. #682

nikcio opened this issue Oct 15, 2022 · 0 comments · Fixed by #1033
Labels
hacktoberfest-accepted is:bug up-for-grabs This issue is open to be worked on by anyone

Comments

@nikcio
Copy link
Contributor

nikcio commented Oct 15, 2022

Mentioned in #648

Issues found: https://sonarcloud.io/project/issues?resolved=false&rules=csharpsquid%3AS3928&id=apache_lucenenet

This is a bug - we need to use the correct parameter name.

For the analysis factories, using the name of a local variable with the same name as the passed in dictionary key is really the best we can do.

NOTE: These factories were meant to be used with Java's Service Provider Interface, which is a service locator that is built-into Java. So, that basically makes them a poor fit for DI methods in .NET. We are considering options for how to deal with these using proper constructor parameters rather than passing in dictionaries and doing a bunch of casting.

@NightOwl888 NightOwl888 added up-for-grabs This issue is open to be worked on by anyone is:bug hacktoberfest-accepted labels Oct 15, 2022
@paulirwin paulirwin added this to the 4.8.0-beta00018 milestone Oct 28, 2024
paulirwin added a commit that referenced this issue Nov 19, 2024
#682 (#1033)

This addresses a few incorrect usages of various argument exceptions, such as missing/incorrect parameter names, using ArgumentOutOfRangeException with a parameter name that doesn't exist, missing messages for ArgumentException, and so on.

For the analysis factories, these were reverted to be ArgumentException because various analysis tools (including Sonar and ReSharper/Rider) complain about using a key name for the dictionary when it doesn't exist as a parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted is:bug up-for-grabs This issue is open to be worked on by anyone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants