rspec/rules/S3086/swift/comments-and-links.adoc

28 lines
1.2 KiB
Plaintext

=== on 19 Jun 2015, 13:59:23 Elena Vilchik wrote:
\[~ann.campbell.2] What about less strict raising issue?
"This rule raises an issue when the function that defines the operation of a custom operator consists of something other than a single *return statement*."
(we don't care about return value expression)
=== on 19 Jun 2015, 15:42:20 Ann Campbell wrote:
That's up to you [~elena.vilchik], but if the point of the rule is to off-load the logic into another function for flexibility, then people can get around the rule if they can cram all the functionality into a single line without actually fulfilling the purpose. E.G.
----
return (( (left % 1) * 100) + ((left - ( (left % 1) * 100)) / 100)) * (((right % 1) * 100) + ((right - ((right % 1) * 100)) / 100))
----
=== on 19 Jun 2015, 15:46:16 Elena Vilchik wrote:
\[~ann.campbell.2] do you have nothing else to do?))
Ok, let's keep it as it is :)
=== on 24 Jun 2015, 09:26:05 Elena Vilchik wrote:
\[~ann.campbell.2] I've added exception and removed all mentioning of "custom" as this rule is about all operator functions. Could you verify?
=== on 24 Jun 2015, 13:49:29 Ann Campbell wrote:
I've made some minor edits [~elena.vilchik]. Double-check me, please.