diff --git a/.clang-tidy b/.clang-tidy index bec1838..93ddb3e 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,5 +1,5 @@ --- -Checks: '*,-abseil-*,-altera-*,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-hicpp-no-array-decay,-hicpp-vararg,-llvmlibc-*,-modernize-use-trailing-return-type,-readability-implicit-bool-conversion,-readability-magic-numbers' +Checks: '*,-abseil-*,-altera-*,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-hicpp-no-array-decay,-hicpp-vararg,-llvmlibc-*,-modernize-use-trailing-return-type,-readability-identifier-length,-readability-implicit-bool-conversion,-readability-magic-numbers' # # For a list of check options, see: # https://clang.llvm.org/extra/clang-tidy/checks/list.html @@ -41,6 +41,9 @@ Checks: '*,-abseil-*,-altera-*,-cppcoreguidelines-avoid-magic-numbers,-cppcoregu # modernize-use-trailing-return-type # I am not quite that modern. # +# readability-identifier-length +# Short identifiers are okay in some cases. +# # readability-implicit-bool-conversion # I don't think this makes the code more readable. # diff --git a/CMakeLists.txt b/CMakeLists.txt index b14c400..e8809d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,7 +126,7 @@ endif(CPPCHECK) # #----------------------------------------------------------------------------- message(STATUS "Looking for clang-tidy") -find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11) +find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-17 clang-tidy-16 clang-tidy-15) if(CLANG_TIDY) message(STATUS "Looking for clang-tidy - found ${CLANG_TIDY}") diff --git a/src/osp-find-colocated-nodes.cpp b/src/osp-find-colocated-nodes.cpp index bd5b1da..1abf795 100644 --- a/src/osp-find-colocated-nodes.cpp +++ b/src/osp-find-colocated-nodes.cpp @@ -117,7 +117,7 @@ class Bucket auto const bytes = m_data.size() * sizeof(osmium::Location); auto const length = ::write(m_fd, m_data.data(), bytes); - if (length != long(bytes)) { // NOLINT(google-runtime-int) + if (length != static_cast(bytes)) { // NOLINT(google-runtime-int) throw std::system_error{errno, std::system_category(), std::string{"can't write to file '"} + m_filename + "'"};