CleanCode icon indicating copy to clipboard operation
CleanCode copied to clipboard

Method too long because of using Contract.Requires / Contract.Ensures

Open kostgr opened this issue 5 years ago • 1 comments

I'm getting the warning, that the method is too long, after adding contract specifications.

 Contract.Requires(taskProject != null);
 Contract.Requires(assignmentTime != null);
 Contract.Ensures(Contract.Result<Assignment>() != null);

Is it possible to ignore lines like this?

kostgr avatar Dec 11 '20 17:12 kostgr

Not at the moment, it's Code so it should be counted. I don't see the point in implementing something like this. Maybe you could elaborate further.

MO2k4 avatar Sep 15 '21 15:09 MO2k4