diff --git a/.clang-tidy b/.clang-tidy index 4e4af908e26..4b9fa61bcc8 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,4 @@ -WarningsAsErrors: "*" +WarningsAsErrors: "" # "*" for Werror behaviour. UseColor: true HeaderFilterRegex: '^(?!MPI_api.h$|PETSc_api.h$).*' # Pulled in from python packages and not classified as system headers ExtraArgsBefore: @@ -6,3 +6,7 @@ ExtraArgsBefore: Checks: > -*, performance* +CheckOptions: + # Design decision: pass nb::ndarray by value, not const ref. + - key: performance-unnecessary-value-param.AllowedTypes + value: 'nanobind::ndarray' diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index 175b7e1fd26..d48d0a8a5a8 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -1,9 +1,9 @@ name: clang-tidy on: - # schedule: - # # daily at 1am - # - cron: "0 1 * * *" + schedule: + # daily at 1am + - cron: "0 1 * * *" # pull_request: # branches: # - main diff --git a/cpp/dolfinx/graph/utils.cpp b/cpp/dolfinx/graph/utils.cpp index f015467a686..4a0781461d5 100644 --- a/cpp/dolfinx/graph/utils.cpp +++ b/cpp/dolfinx/graph/utils.cpp @@ -94,6 +94,7 @@ graph::comm_graph(const common::IndexMap& map, int root) dolfinx::MPI::check_error(comm, ierr); std::vector> e_data; + e_data.reserve(edges_remote.size()); for (std::size_t i = 0; i < edges_remote.size(); ++i) e_data.emplace_back(edges_remote[i], weights_remote[i], markers_remote[i]); return graph::AdjacencyList(std::move(e_data),