]> git.notmuchmail.org Git - sup/blob - HACKING
updated HACKING with better instructions for running locally and editing code
[sup] / HACKING
1 Running Sup from your git checkout
2 ----------------------------------
3
4 Invoke it like this:
5
6   ruby -I lib -w bin/sup
7
8 You'll have to install all gems mentioned in the Rakefile (look for the line
9 setting p.extra_deps). If you're on a Debian or Debian-based system (e.g.
10 Ubuntu), you'll have to make sure you have a complete Ruby installation,
11 especially libssl-ruby. You will need libruby-devel, gcc, and make installed
12 to build certain gems like Ferret. Gem install does not do a good job of
13 detecting when these things are missing and the build fails.
14
15 Rubygems also is particularly aggressive about picking up libraries from
16 installed gems. If you do have Sup installed as a gem, please examine
17 backtraces to make sure you're loading files from the repository and NOT from
18 the installed gem before submitting any bug reports.
19
20 Coding standards
21 ----------------
22
23 - Don't wrap code unless it really benefits from it. The days of 80-column
24   displays are long over. But do wrap comments and other text at whatever vi
25   gq<region> does.
26 - Old lisp-style comment differentiations:
27    # one for comments on the same line as a line of code
28    ## two for comments on their own line, except:
29    ### three for comments that demarcate large sections of code (rare)
30 - Use {} for one-liner blocks and do/end for multi-line blocks.
31 - I like poetry mode. Don't use parentheses unless you must.
32 - The one exception to poetry mode is if-statements that have an assignment in
33   the condition. To make it clear this is not a comparison, surround the
34   condition by parentheses. E.g.:
35
36   if a == b         BUT        if(a = some.computation)
37     ...                          ... something with a
38   end                          end