diff options
| author | Filip Wandzio <contact@philw.dev> | 2026-03-01 11:33:21 +0100 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2026-03-01 11:33:21 +0100 |
| commit | 57b077a4788b7fb5ed6add1df4ba3f15c9e6349b (patch) | |
| tree | 3c860dbe703f2d7269bba72b943f0dd89e8b076e | |
| parent | a2afca302c68b8b5d7c3bec13378180b60a3ac17 (diff) | |
| download | ysnp-57b077a4788b7fb5ed6add1df4ba3f15c9e6349b.tar.gz ysnp-57b077a4788b7fb5ed6add1df4ba3f15c9e6349b.zip | |
Add editor configs and formatter rules
Signed-off-by: Filip Wandzio <contact@philw.dev>
Diffstat (limited to '')
| -rw-r--r-- | .clang-format | 31 | ||||
| -rw-r--r-- | .editorconfig | 22 |
2 files changed, 53 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..670c9d1 --- /dev/null +++ b/.clang-format | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | Language: C | ||
| 2 | BasedOnStyle: LLVM | ||
| 3 | AccessModifierOffset: -4 | ||
| 4 | AlignAfterOpenBracket: Align | ||
| 5 | AlignConsecutiveAssignments: false | ||
| 6 | AlignConsecutiveDeclarations: false | ||
| 7 | AlignEscapedNewlines: Left | ||
| 8 | AlignOperands: true | ||
| 9 | AlignTrailingComments: true | ||
| 10 | AllowAllParametersOfDeclarationOnNextLine: false | ||
| 11 | AllowShortCaseLabelsOnASingleLine: false | ||
| 12 | AllowShortFunctionsOnASingleLine: InlineOnly | ||
| 13 | AllowShortIfStatementsOnASingleLine: false | ||
| 14 | AllowShortLoopsOnASingleLine: false | ||
| 15 | AlwaysBreakAfterReturnType: None | ||
| 16 | BinPackArguments: false | ||
| 17 | BinPackParameters: false | ||
| 18 | BreakBeforeBinaryOperators: NonAssignment | ||
| 19 | BreakBeforeBraces: Linux | ||
| 20 | BreakBeforeTernaryOperators: true | ||
| 21 | BreakConstructorInitializersBeforeComma: true | ||
| 22 | ColumnLimit: 80 | ||
| 23 | ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
| 24 | DerivePointerAlignment: false | ||
| 25 | IndentCaseLabels: true | ||
| 26 | IndentWidth: 8 | ||
| 27 | KeepEmptyLinesAtTheStartOfBlocks: false | ||
| 28 | PointerAlignment: Left | ||
| 29 | SpacesBeforeTrailingComments: 1 | ||
| 30 | TabWidth: 8 | ||
| 31 | UseTab: Always | ||
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e3a3965 --- /dev/null +++ b/.editorconfig | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # EditorConfig dla Embedded C Project | ||
| 2 | root = true | ||
| 3 | |||
| 4 | [*] | ||
| 5 | charset = utf-8 | ||
| 6 | end_of_line = lf | ||
| 7 | insert_final_newline = true | ||
| 8 | trim_trailing_whitespace = true | ||
| 9 | max_line_length = 80 | ||
| 10 | |||
| 11 | [*.c] | ||
| 12 | indent_style = tab | ||
| 13 | indent_size = 8 | ||
| 14 | |||
| 15 | [*.h] | ||
| 16 | indent_style = tab | ||
| 17 | indent_size = 8 | ||
| 18 | |||
| 19 | [Makefile] | ||
| 20 | indent_style = tab | ||
| 21 | indent_size = 8 | ||
| 22 | max_line_length = 120 | ||
