From 6cf58bac95ff62cd3453cba2c898993b40e1da66 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Mon, 8 Jan 2024 23:51:45 -0500 Subject: [PATCH] Add clang-tidy config file All checks are enabled except for those that cause any warning. This is a starting point, some of the currently-suppressed warnings can be fixed hereafter. Closes #1434 --- .clang-tidy | 47 +++++++++++++++++++++++++++++++++++++++++++++++ libusb/version_nano.h | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .clang-tidy diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..6349aa8c --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,47 @@ +--- +Checks: "-*,\ +boost-*,\ +bugprone-*,\ +-bugprone-assignment-in-if-condition,\ +-bugprone-branch-clone,\ +-bugprone-easily-swappable-parameters,\ +-bugprone-implicit-widening-of-multiplication-result,\ +-bugprone-macro-parentheses,\ +-bugprone-misplaced-widening-cast,\ +-bugprone-narrowing-conversions,\ +-bugprone-reserved-identifier,\ +-bugprone-signed-char-misuse,\ +-bugprone-suspicious-string-compare,\ +-bugprone-switch-missing-default-case,\ +-bugprone-unsafe-functions,\ +-bugprone-too-small-loop-variable,\ +clang-analyzer-*,\ +-clang-analyzer-core.NullDereference,\ +-clang-analyzer-deadcode.DeadStores,\ +-clang-analyzer-optin.portability.UnixAPI,\ +-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,\ +-clang-analyzer-security.insecureAPI.strcpy,\ +-clang-analyzer-unix.Malloc,\ +misc-*,\ +-misc-no-recursion,\ +-misc-include-cleaner,\ +modernize-*,\ +-modernize-macro-to-enum,\ +performance-*,\ +-performance-no-int-to-ptr,\ +-performance-type-promotion-in-math-fn,\ +portability-*,\ +readability-*,\ +-readability-braces-around-statements,\ +-readability-else-after-return,\ +-readability-identifier-length,\ +-readability-function-cognitive-complexity,\ +-readability-inconsistent-declaration-parameter-name,\ +-readability-isolate-declaration,\ +-readability-magic-numbers,\ +-readability-non-const-parameter,\ +-readability-uppercase-literal-suffix,\ +-readability-misleading-indentation,\ +" +#WarningsAsErrors: "*" +... diff --git a/libusb/version_nano.h b/libusb/version_nano.h index b22809ba..c309f7b0 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11883 +#define LIBUSB_NANO 11884 -- 2.11.4.GIT