diff --git a/.clang-format b/.clang-format index c84154ceb..695752353 100644 --- a/.clang-format +++ b/.clang-format @@ -2,6 +2,10 @@ BasedOnStyle: Google ColumnLimit: 120 IndentWidth: 4 +DerivePointerAlignment: false +PointerAlignment: Left +ReferenceAlignment: Left + # This will make access modifiers (public/protected/private) sit on the same indentation as `class` keyword AccessModifierOffset: -4 @@ -15,12 +19,16 @@ AlignAfterOpenBracket: AlwaysBreak BinPackArguments: false BinPackParameters: false -# When constructor initializers exist in the constructor definition, leave the colon as last thing on the original -# line instead of putting it on the next line. -BreakConstructorInitializers: AfterColon # Disallow single statements after if/else/for/while/do without curly braces. InsertBraces: true # Separate definition blocks, including classes, structs, enums, and functions. SeparateDefinitionBlocks: Always + +# Line up : and , in ctor init list +AllowShortFunctionsOnASingleLine: false +BreakConstructorInitializers: BeforeComma +ConstructorInitializerAllOnOneLineOrOnePerLine: false + +InsertNewlineAtEOF: true diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index e32dd2030..86152401e 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -115,11 +115,6 @@ function(fetch_dependencies) #################################################################################################################### # spdlog #################################################################################################################### - CPMAddPackage( - NAME spdlog - GITHUB_REPOSITORY gabime/spdlog - GIT_TAG v1.14.1 - VERSION v1.14.1 - ) + CPMAddPackage(NAME spdlog GITHUB_REPOSITORY gabime/spdlog GIT_TAG v1.14.1 VERSION v1.14.1) endfunction() fetch_dependencies() diff --git a/common/logger_.cpp b/common/logger_.cpp index 3427e227c..0a604e6f5 100644 --- a/common/logger_.cpp +++ b/common/logger_.cpp @@ -46,4 +46,4 @@ namespace detail { std::atomic_bool is_initialized = false; } -} // namespace tt::umd::logger \ No newline at end of file +} // namespace tt::umd::logger diff --git a/device/CMakeLists.txt b/device/CMakeLists.txt index d14a7903c..d8d2a231b 100644 --- a/device/CMakeLists.txt +++ b/device/CMakeLists.txt @@ -21,7 +21,7 @@ set(UMD_DEVICE_SRCS wormhole/wormhole_coordinate_manager.cpp pcie/pci_device.cpp hugepage.cpp - ../common/logger_.cpp # ../common looks a bit strange + ../common/logger_.cpp # ../common looks a bit strange ) add_library(device SHARED ${UMD_DEVICE_SRCS}) diff --git a/tests/misc/CMakeLists.txt b/tests/misc/CMakeLists.txt index 42c2cbd3d..d64db65f2 100644 --- a/tests/misc/CMakeLists.txt +++ b/tests/misc/CMakeLists.txt @@ -1,9 +1,12 @@ -set(MISC_TESTS_SRCS - test_logger.cpp -) +set(MISC_TESTS_SRCS test_logger.cpp) add_executable(misc_tests ${MISC_TESTS_SRCS}) -target_link_libraries(misc_tests PRIVATE test_common spdlog::spdlog_header_only) +target_link_libraries( + misc_tests + PRIVATE + test_common + spdlog::spdlog_header_only +) set_target_properties( misc_tests PROPERTIES diff --git a/tests/misc/test_logger.cpp b/tests/misc/test_logger.cpp index d27d81a58..6ca5e68ab 100644 --- a/tests/misc/test_logger.cpp +++ b/tests/misc/test_logger.cpp @@ -214,4 +214,5 @@ TEST_F(LoggerTest, StderrAndDiskPerformance) { } std::cout << ts.to_string() << " for " << num_messages << " messages below level threshold" << std::endl; } -} \ No newline at end of file +} +