From e7ee341e282bc2eaa896e72bc2674b6fe4ae5f3a Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Fri, 6 Dec 2024 16:14:31 -0500 Subject: [PATCH] try to fix remaining annotations Signed-off-by: Jared Van Bortel --- .clang-tidy | 3 +++ .github/workflows/cpp-linter.yml | 6 +++--- gpt4all-backend/src/llamamodel_impl.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index ada9dca9d2a0..bac2413b91fc 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -49,6 +49,7 @@ Checks: - '-cppcoreguidelines-pro-type-member-init' - '-cppcoreguidelines-pro-type-reinterpret-cast' - '-cppcoreguidelines-pro-type-static-cast-downcast' +- '-cppcoreguidelines-pro-type-union-access' - '-cppcoreguidelines-pro-type-vararg' - '-cppcoreguidelines-rvalue-reference-param-not-moved' - '-cppcoreguidelines-special-member-functions' @@ -71,6 +72,7 @@ Checks: - '-modernize-avoid-bind' - '-modernize-deprecated-headers' - '-modernize-loop-convert' +- '-modernize-pass-by-value' - '-modernize-raw-string-literal' - '-modernize-return-braced-init-list' - '-modernize-use-auto' @@ -103,6 +105,7 @@ Checks: - '-readability-identifier-length' - '-readability-implicit-bool-conversion' - '-readability-inconsistent-declaration-parameter-name' +- '-readability-isolate-declaration' - '-readability-math-missing-parentheses' - '-readability-named-parameter' - '-readability-non-const-parameter' diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml index 12f4665025a5..52fc4faa838b 100644 --- a/.github/workflows/cpp-linter.yml +++ b/.github/workflows/cpp-linter.yml @@ -51,12 +51,12 @@ jobs: id: linter with: style: '' # no clang-format - extensions: 'c,cpp,h,inl' + extensions: 'c,cpp' tidy-checks: '' # use .clang-tidy config database: gpt4all-chat/build version: 18 - files-changed-only: false # TODO: set this back to true - ignore: 'gpt4all-chat/build/_deps' + files-changed-only: false + ignore: 'gpt4all-chat/build/_deps|gpt4all-bindings' - name: Fail Fast if: steps.linter.outputs.clang-tidy-checks-failed > 0 run: exit 1 diff --git a/gpt4all-backend/src/llamamodel_impl.h b/gpt4all-backend/src/llamamodel_impl.h index 7d018ddb1083..1f5bde4e5aa6 100644 --- a/gpt4all-backend/src/llamamodel_impl.h +++ b/gpt4all-backend/src/llamamodel_impl.h @@ -6,12 +6,13 @@ #include "llmodel.h" +#include #include #include #include #include -#include #include +#include struct LLamaPrivate; struct EmbModelSpec;