CleanCode icon indicating copy to clipboard operation
CleanCode copied to clipboard

Ignore "Too many arguments" on methods that implement interfaces

Open cmeeren opened this issue 8 years ago • 1 comments

3rd party or builtin interfaces may have methods requiring several arguments (e.g. Xamarin.Forms.IValueConverter, which defines Convert and ConvertBack with four arguments each). In these cases, CleanCode should not warn that the methods that implement the interfaces require too many arguments.

In general, I suggest that interface-implementing methods should be skipped entirely by the "too many arguments" check, and instead CleanCode should warn about this on the actual interface definitions.

cmeeren avatar Nov 23 '16 10:11 cmeeren

In general it would be nice to have an option to include "just my code" or to exclude the BCL / third party libraries. Fox example when implementing IList<T>.Add(T item) it raises a MethodNameNotMeaningful warning. Obviously there is nothing we can do about it except ignoring it.

NKnusperer avatar Apr 10 '17 14:04 NKnusperer