diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..7865666b --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,15 @@ +Checks: '-*,--clang-analyzer-*,-clang-analyzer-cplusplus*,google-*,bugprone-*,cppcoreguidelines-*,readability-*,-bugprone-easily-swappable-parameters,-google-readability-todo' +# Checks: '-*,readability-identifier-naming' +HeaderFilterRegex: '.*' # Makes certain to check header files (by default ignores them) +UseColor: True +CheckOptions: + readability-identifier-length.IgnoredVariableNames: '^_$' # Variables named '_' are ignored + readability-identifier-naming.LocalVariableCase: 'lower_case' + readability-identifier-naming.MemberCase: 'lower_case' + readability-identifier-naming.MemberSuffix: '_' + readability-identifier-naming.FunctionCase: 'camelBack' + readability-identifier-naming.ClassCase: 'CamelCase' + readability-identifier-naming.EnumCase: 'UPPER_CASE' + readability-identifier-naming.ConstexprVariableCase: 'UPPER_CASE' + cppcoreguidelines-avoid-magic-numbers.IgnoredFloatingPointValues: '1.0;2.0;0.5' + readability-magic-numbers.IgnoredFloatingPointValues: '1.0;2.0;0.5' diff --git a/CMakeLists.txt b/CMakeLists.txt index 24f15839..1060dd16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,8 @@ cmake_minimum_required(VERSION 3.12) project(gridkit) +set(CMAKE_CXX_CLANG_TIDY clang-tidy) + set(PACKAGE_NAME "GRIDKIT") set(PACKAGE_STRING "GRIDKIT 0.1.0") set(PACKAGE_TARNAME "gridkit")