diff --git a/README.md b/README.md index 589610202..c3c91a42d 100644 --- a/README.md +++ b/README.md @@ -979,6 +979,33 @@ Translations of the guide are available in the following languages: end ``` +* + Avoid using unless conditional over multiple lines +[[link](#no-multiline-else-blocks)] + + ```Ruby + # bad + unless success? + # multi-line body omitted + end + + # good + multi_line_method unless success? + ``` + +* + Avoid using unless conditional over multiple conditions +[[link](#no-complex-unless)] + + ```Ruby + # bad + do_something unless a and b or !c + + # good + do_something unless success? + ``` + + * Avoid nested modifier `if/unless/while/until` usage. Favor `&&/||` if appropriate.