add rules for time format, casing, sql & Codegen
This commit is contained in:
parent
9de9af8e99
commit
57886016ab
|
@ -58,6 +58,8 @@ Do **not** change the formatting of license texts (e.g.
|
|||
- We use the string `TODO` to mark bits of code that need improvement.
|
||||
- We use the string `DEBUG` to mark bits of code that are only for debugging
|
||||
(remove before next commit).
|
||||
- We use `YYYY-MM-DD hh:mm:ss` (in `UTC`) as date & time format.
|
||||
- We use `camelCase` where possible.
|
||||
- We add (if possible) the following header to files that contain a reasonable
|
||||
amount of self-written code or are essential to the project:
|
||||
|
||||
|
@ -82,6 +84,16 @@ Do **not** change the formatting of license texts (e.g.
|
|||
|
||||
### File specific rules
|
||||
|
||||
#### SQL (.sql)
|
||||
|
||||
- We avoid using spaces and keywords (escape with `` ` `` if necessary).
|
||||
- We write keywords in queries as `ALL CAPS`.
|
||||
- We name databases in `ALL CAPS`
|
||||
- We name tables in `PascalCase`.
|
||||
- We name columns in `camelCase`.
|
||||
- We name foreign keys in this scheme: `FK_SourceTable_sourceColumn`.
|
||||
- We prefix booleans with `IS_`.
|
||||
|
||||
#### Markdown (.md)
|
||||
|
||||
- We add a single `h1` element per document (as a title of the document).
|
||||
|
@ -99,7 +111,7 @@ Do **not** change the formatting of license texts (e.g.
|
|||
---
|
||||
```
|
||||
|
||||
#### YAML
|
||||
#### YAML (.yaml)
|
||||
|
||||
We indent using spaces (1 space wide).
|
||||
|
||||
|
@ -119,6 +131,17 @@ We use the `.yaml` file ending.
|
|||
|
||||
- We use `.graphqls` for defining our graph scheme.
|
||||
|
||||
## Generating code/using tools
|
||||
|
||||
This paragraph does not refer to code generation using neural networks/Ai/LLMs,
|
||||
which is currently disallowed, but instead to _classical Codegen_ (e.g.
|
||||
[gqlgen](https://github.com/99designs/gqlgen)).
|
||||
|
||||
- We document the general steps & commands we use to generate code in
|
||||
[CMD_HISTORY.md](./CMD_HISTORY.md) and commit the result without much
|
||||
modifications. Instead, we commit the necessary changes in an additional
|
||||
commit.
|
||||
|
||||
## Commit messages
|
||||
|
||||
- We write in all lowercase except for special names, e.g. `update Makefile`
|
||||
|
|
Loading…
Reference in New Issue