From 2c3e6cd1593adfa6a8b739d3eaa854bc5e2fc589 Mon Sep 17 00:00:00 2001 From: Matthew Cech Date: Wed, 10 Apr 2019 23:36:05 -0700 Subject: [PATCH] + Added start of a styleguilde --- STYLEGUIDE.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 STYLEGUIDE.md diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md new file mode 100644 index 0000000..12fc856 --- /dev/null +++ b/STYLEGUIDE.md @@ -0,0 +1,46 @@ +KittyBot Style Guide +--- + +#### Indenting +Tabs are used so that individual developers can configure their own width settings, and they won't be enforced on others working on the project. + +` +// No indent! + // One indent! + // Two indents! +` + +#### Braces +When braces are present, Allman style is used which means that braces are on the next line. Braces should be used to prevent scope confusion. Omitting braces on single-line statements is fine so long as the statement is clear. + +` +if(something) +{ + System.out.println("This"); + System.out.println("has"); + System.out.println("braces!"); +} + +if(something) + System.out.println("No braces!"); +` + +#### Naming +Class names and function names are in PascalCase! Variable names are in camelCase! + +` +public class MyClass +{ + private String myString; + + public function MyFuction() + { + // ... + } +} +` + +#### Ternary Operator +Don't. + +#### \ No newline at end of file