source: subversion/applications/editors/potlatch2/CODING.txt @ 25367

Last change on this file since 25367 was 25316, checked in by richard, 9 years ago

make explicit

File size: 1.9 KB
Line 
1== Coding guidelines ==
2
3* Be sensible
4* Be tolerant
5
6== Dependencies and targets ==
7
8* We target Flash Player 9 at present. Please don't add FP10-specific code yet.
9* Potlatch 2 requires Flex; the Halcyon rendering component doesn't. Don't add Flex stuff (import mx.*) to anything in net.systemeD.halcyon.
10* 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
11
12== Whitespace ==
13
14* Use space, not tabs. You can only get away with tabs if your name is Richard Fairhurst
15* Set your editor to treat tabs as four spaces when viewing them, otherwise you'll go mad
16* Blank lines shouldn't have whitespace
17* No trailing whitespace
18* Only "fix" whitespace errors while changing that line of code for other reasons. Otherwise, it's not worth fixing.
19
20== Indentation ==
21
22package net.systemed.potlatch2.indentation {
23
24    class IndentedByFourSpaces {
25
26        public function IndentedByFourMoreSpaces():void {
27            if (indentedCodeWithinFunctionHasTwoSpaceIndents) {
28              // lots of places in the codebase have two-space indents within functions
29              // like this. Don't mix and match like this example!
30              beConsistent = true;
31            } else {
32                useFourSpaceIndents = true;
33            }
34        }
35    }
36}
37
38== MXML ==
39
40* Indentation is like the wild west in there. Consistency is king.
41
42== Icons ==
43
44* POI icons for map_features are 24x24 and come from the CC0-licensed SJJB set (http://www.sjjb.co.uk/icons)
45* POI icons for Halcyon stylesheets are 16x16 and also come from the SJJB set
46* Way icons for map_features are 75x45 and have up to now generally been drawn by Richard (see way_icons.ai)
47* 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.
48* Only deployable files go in resources/ . Vector source files go in resources_src/
Note: See TracBrowser for help on using the repository browser.