You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should ensure that all calls to new ArgumentException and new ArgumentNullException use one of the overloads that accept a parameter name.
Additionally, we should verify that this value is a compile-time-resolvable constant that matches one of the argument names.
Code fix providers: maybe one for each of the arguments that supplies nameof(argumentName) in the appropriate position? Other than that, I don't know of automatic fixes that could be provided.
We might also provide a code fix provider that finds constant strings and turns them into nameof operator usages, although this would probably be need to be flagged at a level less than a warning, unless we want to introduce a lot of noise to older projects.
The text was updated successfully, but these errors were encountered:
We should ensure that all calls to
new ArgumentException
andnew ArgumentNullException
use one of the overloads that accept a parameter name.Additionally, we should verify that this value is a compile-time-resolvable constant that matches one of the argument names.
Code fix providers: maybe one for each of the arguments that supplies
nameof(argumentName)
in the appropriate position? Other than that, I don't know of automatic fixes that could be provided.We might also provide a code fix provider that finds constant strings and turns them into
nameof
operator usages, although this would probably be need to be flagged at a level less than a warning, unless we want to introduce a lot of noise to older projects.The text was updated successfully, but these errors were encountered: