Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: sky/specs/style-guide.md

Issue 1178623002: Remove _emptyList from fn2.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: style fix Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/sdk/lib/framework/fn2.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Sky Style Guide 1 Sky Style Guide
2 =============== 2 ===============
3 3
4 In general, follow our [Design Principles](design.md) for all code. 4 In general, follow our [Design Principles](design.md) for all code.
5 5
6 6
7 Dart 7 Dart
8 ---- 8 ----
9 9
10 In general, follow the [Dart style 10 In general, follow the [Dart style
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 come immediately after the constructors. 44 come immediately after the constructors.
45 45
46 Be consistent in the order of members. If a constructor lists a bunch 46 Be consistent in the order of members. If a constructor lists a bunch
47 of fields, then those fields should declared be in the same order, and 47 of fields, then those fields should declared be in the same order, and
48 any code that operates on all of them should operate on them in the 48 any code that operates on all of them should operate on them in the
49 same order (unless the order matters). 49 same order (unless the order matters).
50 50
51 51
52 All variables and arguments are typed; don't use "var", "dynamic", or 52 All variables and arguments are typed; don't use "var", "dynamic", or
53 "Object" in any case where you could figure out the actual type. 53 "Object" in any case where you could figure out the actual type.
54 Always specialise generic types where possible. Even for ```[]``` and 54 Always specialise generic types where possible.
55 ```{}``` literals, include the types.
56 55
57 Aim for a line length of 80 characters, but go over if breaking the 56 Aim for a line length of 80 characters, but go over if breaking the
58 line would make it less readable. 57 line would make it less readable.
59 58
60 Only use => when the result fits on a single line. 59 Only use => when the result fits on a single line.
61 60
62 When using ```{ }``` braces, put a space or a newline after the open 61 When using ```{ }``` braces, put a space or a newline after the open
63 brace and before the closing brace. (If the black is empty, the same 62 brace and before the closing brace. (If the black is empty, the same
64 space will suffice for both.) 63 space will suffice for both.)
65 64
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 > ``` 96 > ```
98 97
99 98
100 C++ 99 C++
101 --- 100 ---
102 101
103 102
104 Java 103 Java
105 ---- 104 ----
106 105
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/fn2.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698