-
Notifications
You must be signed in to change notification settings - Fork 49
/
CODING.txt
52 lines (37 loc) · 1.99 KB
/
CODING.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
== Coding guidelines ==
* Be sensible
* Be tolerant
== Dependencies and targets ==
* We target Flash Player 10.
* Potlatch 2 requires Flex; the Halcyon rendering component doesn't. Don't add Flex stuff (import mx.*) to anything in net.systemeD.halcyon.
* Both Potlatch 2 and Halcyon can be deployed locally (i.e. not on openstreetmap.org), and indeed can talk to databases other than the main OSM instance. So don't be too OSM-specific
== Whitespace ==
* Use space, not tabs. You can only get away with tabs if your name is Richard Fairhurst
* Set your editor to treat tabs as four spaces when viewing them, otherwise you'll go mad
* Blank lines shouldn't have whitespace
* No trailing whitespace
* Only "fix" whitespace errors while changing that line of code for other reasons. Otherwise, it's not worth fixing.
== Indentation ==
package net.systemed.potlatch2.indentation {
class IndentedByFourSpaces {
public function IndentedByFourMoreSpaces():void {
if (indentedCodeWithinFunctionHasTwoSpaceIndents) {
// lots of places in the codebase have two-space indents within functions
// like this. Don't mix and match like this example!
beConsistent = true;
} else {
useFourSpaceIndents = true;
}
}
}
}
== MXML ==
* Indentation is like the wild west in there. Consistency is king.
== Icons ==
* POI icons for map_features are 24x24 and come from the CC0-licensed SJJB set (http://www.sjjb.co.uk/mapicons)
* POI icons for Halcyon stylesheets are 16x16 and also come from the SJJB set
* Way icons for map_features are 75x45 and have up to now generally been drawn by Richard (see way_icons.ai)
* All features must have a unique icon, and all icons must be in the correct style. Do not add a feature without a matching icon.
* Only deployable files go in resources/ . Vector source files go in resources_src/
== babelFx ==
* Currently using forked version from https://github.com/gravitystorm/l10n_Injection