diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..e809df5 --- /dev/null +++ b/.clang-format @@ -0,0 +1,48 @@ +BasedOnStyle: LLVM + +# Pointer/Reference alignment: int * p, void (* callback)(...) +PointerAlignment: Left +ReferenceAlignment: Left + +# Line length +ColumnLimit: 100 + +# Return type on its own line +BreakAfterReturnType: All + +# Params each on their own line +BinPackParameters: false + +# Indentation +IndentWidth: 4 +TabWidth: 4 +UseTab: Never +ContinuationIndentWidth: 4 + +# Braces always on their own line (Allman style) +BreakBeforeBraces: Allman + +# No blank line after opening { +KeepEmptyLinesAtTheStartOfBlocks: false + +# Space after C-style cast: (uint32_t) x +SpaceAfterCStyleCast: true + +# Spaces +SpaceInEmptyParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false + +# Allow single-line if without braces +AllowShortIfStatementsOnASingleLine: WithoutElse + +# Include sorting +SortIncludes: CaseSensitive +IncludeBlocks: Regroup + +# Short constructs +AllowShortFunctionsOnASingleLine: Empty +AllowShortLoopsOnASingleLine: false + +# Comments +ReflowComments: true diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..b196ea8 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,29 @@ +Checks: > + bugprone-*, + cert-*, + clang-analyzer-*, + misc-*, + performance-*, + portability-*, + readability-*, + -readability-magic-numbers, + -readability-identifier-length, + -readability-function-cognitive-complexity, + -readability-braces-around-statements, + -cert-err33-c, + -misc-include-cleaner + +CheckOptions: + - key: bugprone-easily-swappable-parameters.MinimumLength + value: 3 + - key: readability-identifier-naming.FunctionCase + value: lower_case + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.MacroDefinitionCase + value: UPPER_CASE + - key: readability-identifier-naming.TypedefCase + value: CamelCase + +HeaderFilterRegex: '.*' +FormatStyle: file diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..b515205 --- /dev/null +++ b/main.cpp @@ -0,0 +1,11 @@ +// +// Created by Paul Horn on 08.08.26. +// + +#include "main.h" + +namespace tui { + int main() { + return 0; + } +} // tui diff --git a/main.h b/main.h new file mode 100644 index 0000000..7569411 --- /dev/null +++ b/main.h @@ -0,0 +1,14 @@ +// +// Created by Paul Horn on 08.08.26. +// + +#ifndef TUI_FRAMEWORK_MAIN_H +#define TUI_FRAMEWORK_MAIN_H + +namespace tui { + +class main {}; + +} // namespace tui + +#endif // TUI_FRAMEWORK_MAIN_H