From 9216c1a0e2e3bfbd0634b874974343e039af768c Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Thu, 12 Aug 2021 17:43:26 +0000 Subject: [PATCH] GitBook: [main] 66 pages modified --- docs/open-source-community/developer/coding-style.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/open-source-community/developer/coding-style.md b/docs/open-source-community/developer/coding-style.md index 6f5aebe727d..6ac380f5b32 100644 --- a/docs/open-source-community/developer/coding-style.md +++ b/docs/open-source-community/developer/coding-style.md @@ -6,14 +6,14 @@ description: >- # Coding Style -## Basic +## Basics 1. Avoid cryptic abbreviations. Single letter variable names are fine in very short methods with few variables, otherwise make them informative. 2. Clear code is preferable to comments. When possible make your naming so good you don't need comments. When that isn't possible comments should be thought of as mandatory, write them to be read. 3. Logging, configuration, and public APIs are our "UI". Make them pretty, consistent, and usable. -4. Maximum line length is 130. +4. Maximum line length is 120. 5. Don't leave TODOs in the code or FIXMEs if you can help it. Don't leave println statements in the code. TODOs should be filed as github tasks. -6. User documentation should be considered a part of any user-facing the feature, just like unit tests. Example REST apis should've accompanaying documentation. +6. User documentation should be considered a part of any user-facing the feature, just like unit tests. Example REST apis should've accompanying documentation. 7. Tests should never rely on timing in order to pass. 8. Every unit test should leave no side effects, i.e., any test dependencies should be set during setup and clean during tear down.