clang-tidy ignore cert-flp30-c only in tests

This commit is contained in:
Daniel Agar 2017-05-13 15:00:13 -04:00
parent 94f5df8611
commit 0d0cbd8243
4 changed files with 75 additions and 5 deletions

View File

@ -2,7 +2,6 @@ Checks: '*
,-cert-dcl50-cpp ,-cert-dcl50-cpp
,-cert-err34-c ,-cert-err34-c
,-cert-err58-cpp ,-cert-err58-cpp
,-cert-flp30-c
,-cert-msc30-c ,-cert-msc30-c
,-cert-msc50-cpp ,-cert-msc50-cpp
,-clang-analyzer-core.CallAndMessage ,-clang-analyzer-core.CallAndMessage
@ -14,7 +13,6 @@ Checks: '*
,-clang-analyzer-deadcode.DeadStores ,-clang-analyzer-deadcode.DeadStores
,-clang-analyzer-optin.cplusplus.VirtualCall ,-clang-analyzer-optin.cplusplus.VirtualCall
,-clang-analyzer-optin.performance.Padding ,-clang-analyzer-optin.performance.Padding
,-clang-analyzer-security.FloatLoopCounter
,-clang-analyzer-security.insecureAPI.strcpy ,-clang-analyzer-security.insecureAPI.strcpy
,-clang-analyzer-unix.cstring.BadSizeArg ,-clang-analyzer-unix.cstring.BadSizeArg
,-clang-analyzer-unix.Malloc ,-clang-analyzer-unix.Malloc

View File

@ -0,0 +1,74 @@
Checks: '*
,-cert-dcl50-cpp
,-cert-err34-c
,-cert-err58-cpp
,-cert-flp30-c
,-cert-msc30-c
,-cert-msc50-cpp
,-clang-analyzer-core.CallAndMessage
,-clang-analyzer-core.NullDereference
,-clang-analyzer-core.UndefinedBinaryOperatorResult
,-clang-analyzer-core.uninitialized.Assign
,-clang-analyzer-core.VLASize
,-clang-analyzer-cplusplus.NewDeleteLeaks
,-clang-analyzer-deadcode.DeadStores
,-clang-analyzer-optin.cplusplus.VirtualCall
,-clang-analyzer-optin.performance.Padding
,-clang-analyzer-security.FloatLoopCounter
,-clang-analyzer-security.insecureAPI.strcpy
,-clang-analyzer-unix.cstring.BadSizeArg
,-clang-analyzer-unix.Malloc
,-clang-analyzer-unix.MallocSizeof
,-cppcoreguidelines-c-copy-assignment-signature
,-cppcoreguidelines-interfaces-global-init
,-cppcoreguidelines-no-malloc
,-cppcoreguidelines-pro-bounds-array-to-pointer-decay
,-cppcoreguidelines-pro-bounds-constant-array-index
,-cppcoreguidelines-pro-bounds-pointer-arithmetic
,-cppcoreguidelines-pro-type-const-cast
,-cppcoreguidelines-pro-type-cstyle-cast
,-cppcoreguidelines-pro-type-member-init
,-cppcoreguidelines-pro-type-reinterpret-cast
,-cppcoreguidelines-pro-type-union-access
,-cppcoreguidelines-pro-type-vararg
,-cppcoreguidelines-special-member-functions
,-google-build-using-namespace
,-google-explicit-constructor
,-google-global-names-in-headers
,-google-readability-casting
,-google-readability-namespace-comments
,-google-readability-todo
,-google-runtime-int
,-google-runtime-references
,-llvm-header-guard
,-llvm-include-order
,-llvm-namespace-comment
,-misc-incorrect-roundings
,-misc-macro-parentheses
,-misc-misplaced-widening-cast
,-misc-redundant-expression
,-misc-unconventional-assign-operator
,-misc-unused-parameters
,-modernize-deprecated-headers
,-modernize-loop-convert
,-modernize-use-auto
,-modernize-use-bool-literals
,-modernize-use-default-member-init
,-modernize-use-emplace
,-modernize-use-equals-default
,-modernize-use-equals-delete
,-modernize-use-override
,-modernize-use-using
,-performance-inefficient-string-concatenation
,-readability-avoid-const-params-in-decls
,-readability-braces-around-statements
,-readability-else-after-return
,-readability-implicit-bool-cast
,-readability-inconsistent-declaration-parameter-name
,-readability-named-parameter
,-readability-non-const-parameter
,-readability-redundant-declaration
,-readability-redundant-member-init
,-readability-simplify-boolean-expr
'
WarningsAsErrors: '*'

View File

@ -37,8 +37,6 @@
* *
*/ */
#include <px4_config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h> #include <stdio.h>

View File

@ -75,7 +75,7 @@ const unsigned output_max = 8;
static float actuator_controls[output_max]; static float actuator_controls[output_max];
static bool should_prearm = false; static bool should_prearm = false;
#define NAN_VALUE 0.0f/0.0f #define NAN_VALUE (0.0f/0.0f)
#ifdef __PX4_DARWIN #ifdef __PX4_DARWIN
#define MIXER_DIFFERENCE_THRESHOLD 30 #define MIXER_DIFFERENCE_THRESHOLD 30