Skip to content

Commit 95ae866

Browse files
committed
First cut of a contributing file
1 parent 4c98548 commit 95ae866

File tree

2 files changed

+36
-27
lines changed

2 files changed

+36
-27
lines changed

sparta/CONTRIBUTING.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
# Contributing to Sparta: Guidelines
3+
4+
Bug fixes, enhancements are welcomed and encouraged. But there are a
5+
few rules...
6+
7+
## Rules for Code Development
8+
9+
* Rule1: Any bug fix/enhancement _must be accompanied_ with a test
10+
that illustrates the bug fix/enhancement. No test == no acceptance.
11+
Documentation fixes obviously don't require this...
12+
13+
* Rule2: Adhere to [Sparta's Coding
14+
Style](sparta's-coding-style). Look at the existing code and mimic
15+
it. Don't mix another preferred style with Sparta's. Stick with
16+
Sparta's.
17+
18+
## Sparta's Coding Style
19+
20+
* There are simple style rules:
21+
1. Class names are `CamelCase` with the Camel's head up: `class SpartaHandler`
22+
1. Public class method names are `camelCase` with the camel's head down: `void myMethod()`
23+
1. Private/protected class method names are `camelCase_` with the camel's head down and a trailing `_`: `void myMethod_()`
24+
1. Member variable names that are `private` or `protected` must
25+
be all `lower_case_` with a trailing `_` so developers know a
26+
memory variable is private or protected. Placing an `_`
27+
between words: preferred.
28+
1. Header file guards are `#pragma once`
29+
1. Any function/class from `std` namespace must always be
30+
explicit: `std::vector` NOT `vector`. Never use `using
31+
namespace <blah>;` in *any* header file
32+
1. Consider using source files for non-critical path code
33+
1. Try to keep methods short and concise (yes, we break this rule a bit)
34+
1. Do not go nuts with `auto`. This `auto foo(const auto & in)` is ... irritating
35+
1. All public APIs *must be doxygenated*. No exceptions.

sparta/README.md

+1-27
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,7 @@ Follow the directions found in [map/README.md](https://github.com/sparcians/map/
4343

4444
## Developing on Sparta
4545

46-
Bug fixes, enhancements are welcomed and encouraged. But there are a
47-
few rules...
48-
49-
* Rule1: Any bug fix/enhancement _must be accompanied_ with a test
50-
that illustrates the bug fix/enhancement. No test == no acceptance.
51-
Documentation fixes obviously don't require this...
52-
53-
* Rule2: Adhere to Sparta's Coding Style. Look at the existing code
54-
and mimic it. Don't mix another preferred style with Sparta's.
55-
Stick with Sparta's.
56-
57-
* There are simple style rules:
58-
1. Class names are `CamelCase` with the Camel's head up: `class SpartaHandler`
59-
1. Public class method names are `camelCase` with the camel's head down: `void myMethod()`
60-
1. Private/protected class method names are `camelCase_` with the camel's head down and a trailing `_`: `void myMethod_()`
61-
1. Member variable names that are `private` or `protected` must
62-
be all `lower_case_` with a trailing `_` so developers know a
63-
memory variable is private or protected. Placing an `_`
64-
between words: preferred.
65-
1. Header file guards are `#pragma once`
66-
1. Any function/class from `std` namespace must always be
67-
explicit: `std::vector` NOT `vector`. Never use `using
68-
namespace <blah>;` in *any* header file
69-
1. Consider using source files for non-critical path code
70-
1. Try to keep methods short and concise (yes, we break this rule a bit)
71-
1. Do not go nuts with `auto`. This `auto foo(const auto & in)` is ... irritating
72-
1. All public APIs *must be doxygenated*. No exceptions.
46+
See CONTRIBUTING.md
7347

7448
### Python Shell (not well supported)
7549

0 commit comments

Comments
 (0)