From b2fcb608d595f5b5644976a7169337dd38457115 Mon Sep 17 00:00:00 2001 From: Jan Polensky Date: Wed, 27 Aug 2025 16:53:49 +0200 Subject: [PATCH] Add project-wide .clang-tidy configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a .clang-tidy file to provide consistent code quality checks across the project. The configuration is not integrated into .pre-commit-config.yaml because it depends on a recently generated compile_commands.json file. Example usage: clang-tidy --fix-errors **/*.[ch] Note: Running clang-tidy should be considered optional, not enforced. Reviewed-by: Jan Höppner Signed-off-by: Jan Polensky Signed-off-by: Jan Höppner --- .clang-tidy | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .clang-tidy diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..cf6af3de --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,36 @@ +Checks: > + bugprone-*, + clang-analyzer-*, + misc-*, + performance-*, + portability-*, + readability-*, + -bugprone-easily-swappable-parameters, + -misc-include-cleaner, + -readability-braces-around-statements, + -readability-identifier-length, + -modernize-*, + -performance-*, + -portability-*, + -readability-implicit-bool-conversion + +CheckOptions: + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.FunctionCase + value: lower_case + - key: readability-identifier-naming.StructCase + value: lower_case + - key: readability-identifier-naming.EnumCase + value: lower_case + - key: readability-identifier-naming.EnumConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.MacroDefinitionCase + value: UPPER_CASE + - key: bugprone-sizeof-expression.WarnOnSizeOfPointer + value: true + - key: misc-unused-parameters.StrictMode + value: true + +FormatStyle: file +UseColor: true