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
S4018 was introduced to encourage the use of generic methods which can be called using type inference (the type parameters don't have to be explicitly specified during invocation).
The rule issues the message "Refactor this method to have parameters matching all the type parameters." when it encounters such method declarations. This doesn't show the reason why the programmer should change the method signature.
Recommendation: change the rule's message to "Use all type parameters in the parameter list to enable type inference."
The text was updated successfully, but these errors were encountered:
zsolt-kolbay-sonarsource
changed the title
S4018 Rule message does not reflect the rule's original intent
Update S4018: Improve rule message
Jan 31, 2023
S4018 was introduced to encourage the use of generic methods which can be called using type inference (the type parameters don't have to be explicitly specified during invocation).
The rule issues the message
"Refactor this method to have parameters matching all the type parameters."
when it encounters such method declarations. This doesn't show the reason why the programmer should change the method signature.Recommendation: change the rule's message to
"Use all type parameters in the parameter list to enable type inference."
The text was updated successfully, but these errors were encountered: