diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-04-21 23:03:16 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-04-21 23:03:16 +0800 |
| commit | 1fe056570220411bdb409c26e7580443a7bd9f4a (patch) | |
| tree | 8a206d356ba54223a5c704d5a9a650f163bf03a0 | |
| parent | e2564d112ba03b432f9f44f445cbc4a3ed85751a (diff) | |
| download | lume-1fe056570220411bdb409c26e7580443a7bd9f4a.tar.gz lume-1fe056570220411bdb409c26e7580443a7bd9f4a.tar.xz | |
feat: add .clang-format and .clang-tidy configuration files for code formatting and linting
| -rw-r--r-- | .gitignore | 28 | ||||
| -rw-r--r-- | na/.clang-format | 35 | ||||
| -rw-r--r-- | na/.clang-tidy | 23 |
3 files changed, 84 insertions, 2 deletions
@@ -1,3 +1,27 @@ -tree.txt build/ -fs.img
\ No newline at end of file +na/build/ +*.o +*.d +*.elf +*.bin +*.asm +*.img +tree.txt +compile_commands.json +.clangd/ +.cache/ +.vscode/ +# !.vscode/extensions.json +# !.vscode/launch.json +# !.vscode/settings.json +*~ +*.swp +*.swo +.idea/ +cmake-build-*/ +gdb.txt +.gdb_history +vgcore.* +core +.DS_Store +Thumbs.db
\ No newline at end of file diff --git a/na/.clang-format b/na/.clang-format new file mode 100644 index 0000000..141e1e2 --- /dev/null +++ b/na/.clang-format @@ -0,0 +1,35 @@ +Language: Cpp +Standard: c++23 +BasedOnStyle: Google + +# Core Formatting +IndentWidth: 4 +ColumnLimit: 100 +TabWidth: 4 +UseTab: Never + +# Pointers and References +PointerAlignment: Left +ReferenceAlignment: Left + +# Includes +SortIncludes: true + +# Alignment +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignConsecutiveMacros: true + +# Control Statements +BreakBeforeBraces: Attach +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AllowShortFunctionsOnASingleLine: Empty + +# Spaces +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesInAngles: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +SpaceAfterTemplateKeyword: true diff --git a/na/.clang-tidy b/na/.clang-tidy new file mode 100644 index 0000000..1af2c5a --- /dev/null +++ b/na/.clang-tidy @@ -0,0 +1,23 @@ +Checks: > + -*, + clang-analyzer-*, + performance-*, + bugprone-*, + readability-*, + misc-*, + modernize-*, + -modernize-use-trailing-return-type, + -modernize-use-nodiscard, + -readability-identifier-length + +WarningsAsErrors: '' +HeaderFilterRegex: '.*' +FormatStyle: 'file' +CheckOptions: + readability-identifier-naming.ClassCase: PascalCase + readability-identifier-naming.StructCase: PascalCase + readability-identifier-naming.VariableCase: lower_case + readability-identifier-naming.FunctionCase: lower_case + readability-identifier-naming.GlobalVariableCase: lower_case + readability-identifier-naming.GlobalVariablePrefix: g_ + readability-identifier-naming.PrivateMemberSuffix: _ |
