diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..2776bd4 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,9 @@ +Checks: '-*,readability-identifier-naming' +CheckOptions: + - { key: readability-identifier-naming.PrivateMemberSuffix, value: "_" } + - { key: readability-identifier-naming.AggressiveDependentMemberLookup, value: true } + - { key: readability-identifier-naming.ProtectedMemberSuffix, value: "_" } + - { key: readability-identifier-naming.ClassCase, value: "lower_case" } + - { key: readability-identifier-naming.StructCase, value: "lower_case" } + - { key: readability-identifier-naming.FunctionCase, value: "lower_case" } + - { key: readability-identifier-naming.MethodCase, value: "lower_case" } diff --git a/SConstruct b/SConstruct index e70a59e..aa8a463 100644 --- a/SConstruct +++ b/SConstruct @@ -48,6 +48,8 @@ env=Environment(ENV=os.environ, variables=env_vars, CPPPATH=['#source','#','#dri CXXFLAGS=['-std=c++20','-g','-Wall','-Wextra'], LIBS=['forstio','xcb','X11','X11-xcb']) env.__class__.add_source_files = add_kel_source_files +env.Tool('compilation_db'); +env.cdb = env.CompilationDatabase('compile_commands.json'); env.sources = [] env.headers = [] @@ -96,6 +98,7 @@ format_iter(env,env.sources + env.headers + env.gl_sources + env.gl_headers) env.Alias('format', env.format_actions) +env.Alias('cdb', env.cdb); env.Alias('all', ['format', 'library_shared', 'library_static']) env.Install('$prefix/lib/', [env.library_shared, env.library_static])