summaryrefslogtreecommitdiffstats
path: root/HACKING
diff options
context:
space:
mode:
authorNicolas Despres <nicolas.despres@gmail.com>2011-05-02 15:56:45 (GMT)
committerNicolas Despres <nicolas.despres@gmail.com>2011-05-02 15:56:45 (GMT)
commit15458fbd7cc9a9d7e78f3e2d78aab698bbe86398 (patch)
tree0e3e5f05ed06f37b66588b954d00b21833a500d8 /HACKING
parent23a7aa78bf2a8fffc27eec74e928c6681d11f094 (diff)
downloadNinja-15458fbd7cc9a9d7e78f3e2d78aab698bbe86398.zip
Ninja-15458fbd7cc9a9d7e78f3e2d78aab698bbe86398.tar.gz
Ninja-15458fbd7cc9a9d7e78f3e2d78aab698bbe86398.tar.bz2
Add coding and documentation guidelines.
As discussed on the mailing list.
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING20
1 files changed, 20 insertions, 0 deletions
diff --git a/HACKING b/HACKING
index ac69256..f146546 100644
--- a/HACKING
+++ b/HACKING
@@ -12,3 +12,23 @@ Test-driven development:
now you can repeatedly run that while developing until the tests pass.
Remember to build "all" before committing to verify the other source
still works!
+
+Coding guidelines:
+- Function name are camelcase.
+- Member methods are camelcase, expect for trivial getters which are
+ underscore separated.
+- Local variables are underscore separated.
+- Member variables are underscore separated and suffixed by an extra underscore.
+- Two spaces indentation.
+- Opening braces is at the end of line.
+- Lines are 80 columns maximum.
+- All source files should have the Google Inc. license header.
+- Also follow this style:
+ http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
+
+Documentation guidelines:
+- Use /// for doxygen.
+- Use \a to refer to arguments.
+- It's not necessary to document each argument, especially when they're
+ relatively self-evident (e.g. in CanonicalizePath(string* path, string* err),
+ the arguments are hopefully obvious)