diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-08-11 21:13:02 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-08-11 21:13:02 -0700 |
| commit | 0a482bbbfe1dbabaab6b7a5c26ec4f29f0c618d9 (patch) | |
| tree | 1318605d365b86740b084efdbad95fdca3babdac | |
| parent | 2ed949a6ae053262ee563b198a8758ba82f50e84 (diff) | |
| download | zig-0a482bbbfe1dbabaab6b7a5c26ec4f29f0c618d9.tar.gz zig-0a482bbbfe1dbabaab6b7a5c26ec4f29f0c618d9.zip | |
add style guide
| -rw-r--r-- | doc/style.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/style.md b/doc/style.md new file mode 100644 index 0000000000..d748a9282a --- /dev/null +++ b/doc/style.md @@ -0,0 +1,16 @@ +# Official Style Guide + +These conventions are not enforced by the compiler, but they are shipped in +this documentation along with the compiler in order to provide a point of +reference, should anyone wish to point to an authority on agreed upon Zig +coding style. + + * 4 space indentation + * `camelCaseFunctionName` + * `TitleCaseTypeName` + * `snake_case_variable_name` + * Open braces on same line, unless you need to wrap. + * If a list of things is longer than 2, put each item on its own line and + exercise the abilty to put an extra comma at the end. + +See Zig standard library for examples. |
