From 0a4de6e2fce6aa14ae9525840b9254cdbceb2e7d Mon Sep 17 00:00:00 2001 From: Kane York Date: Sat, 28 Jun 2014 23:48:12 -0700 Subject: [PATCH] Reword statement in standards.md --- standards.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/standards.md b/standards.md index d742dc60f..3306435fd 100644 --- a/standards.md +++ b/standards.md @@ -58,12 +58,13 @@ finally () { break; case 2: -* Whenever possible, check for a negative, rather than a positive - *
if (!something) {
-            // Do things
+* Prefer early returns over method indentation. Example:
+ * 
if (!precondition) {
+            // Possibly cleanup
+            return;
         }
 
-        // Do other things
+ // Continue with task
* Java standard class and method naming, with exception to McMMO in a class name *
thisIsAMethod()
*
ThisIsAClass
@@ -92,4 +93,4 @@ finally () { * private * static private * abstract private -* No one-line if statements, they should all have brackets \ No newline at end of file +* No one-line if statements, they should all have brackets