From d3963f596efefd0c02618529cac440c70decd256 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Tue, 12 Jan 2016 16:35:20 +0000 Subject: [PATCH] akwizgran created page: code style --- code-style.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 code-style.md diff --git a/code-style.md b/code-style.md new file mode 100644 index 0000000..6497637 --- /dev/null +++ b/code-style.md @@ -0,0 +1,11 @@ +# Code Style + +* Lines no longer than 80 characters +* Egyptian brackets +* Tabs for indentation, tab width of 4 +* `if/else/for/while` may omit brackets if the body fits on a single line +* `else/catch/finally` continue the same line as the preceding bracket +* If a file uses spaces, follow the file's existing indentation or re-indent the whole file in a separate commit +* Use `foo` rather than `mFoo` for field names +* Use `foo` rather than `this.foo` unless there's also a local `foo` +* `CONSTANTS_LIKE_THIS`, `variablesLikeThis`