mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-06 12:50:40 +02:00
fix clang-tidy on ci actions + other improvements (#62)
install version 17 for clang-tidy on github actions use warnings as errors in .clang-tidy use better clang-tidy checks use option in CMakeLists to use clang-tidy-17 instead of clang-tidy (14)
This commit is contained in:
parent
28d7e8c07a
commit
1d0de6876e
527
.clang-tidy
527
.clang-tidy
@ -1,492 +1,49 @@
|
||||
---
|
||||
Checks: '
|
||||
|
||||
|
||||
|
||||
# DISABLE CHECKS:
|
||||
# readability-magic-numbers
|
||||
# - misc-include-cleaner (issues with includes from associated header files)
|
||||
# (should fixed in 18.1.0 release)
|
||||
# - cppcoreguidelines-avoid-magic-numbers
|
||||
# - cppcoreguidelines-owning-memory
|
||||
# - bugprone-easily-swappable-parameters
|
||||
# - cppcoreguidelines-non-private-member-variables-in-classes
|
||||
|
||||
# cppcoreguidelines-special-member-functions
|
||||
# hicpp-special-member-functions
|
||||
|
||||
# cert-err33-c # too much with c file api
|
||||
|
||||
# modernize-pass-by-value # contradicts with other checks
|
||||
|
||||
|
||||
# abseil-cleanup-ctad
|
||||
# abseil-duration-addition
|
||||
# abseil-duration-comparison
|
||||
# abseil-duration-conversion-cast
|
||||
# abseil-duration-division
|
||||
# abseil-duration-factory-float
|
||||
# abseil-duration-factory-scale
|
||||
# abseil-duration-subtraction
|
||||
# abseil-duration-unnecessary-conversion
|
||||
# abseil-faster-strsplit-delimiter
|
||||
# abseil-no-internal-dependencies
|
||||
# abseil-no-namespace
|
||||
# abseil-redundant-strcat-calls
|
||||
# abseil-str-cat-append
|
||||
# abseil-string-find-startswith
|
||||
# abseil-string-find-str-contains
|
||||
# abseil-time-comparison
|
||||
# abseil-time-subtraction
|
||||
# abseil-upgrade-duration-conversions
|
||||
android-cloexec-accept
|
||||
|
||||
android-cloexec-accept4
|
||||
android-cloexec-creat
|
||||
android-cloexec-dup
|
||||
android-cloexec-epoll-create
|
||||
android-cloexec-epoll-create1
|
||||
android-cloexec-inotify-init
|
||||
android-cloexec-inotify-init1
|
||||
android-cloexec-memfd-create
|
||||
android-cloexec-open
|
||||
android-cloexec-pipe
|
||||
android-cloexec-pipe2
|
||||
android-cloexec-socket
|
||||
android-comparison-in-temp-failure-retry
|
||||
boost-use-to-string
|
||||
bugprone-argument-comment
|
||||
bugprone-assert-side-effect
|
||||
bugprone-assignment-in-if-condition
|
||||
bugprone-bad-signal-to-kill-thread
|
||||
bugprone-bool-pointer-implicit-conversion
|
||||
bugprone-branch-clone
|
||||
bugprone-copy-constructor-init
|
||||
bugprone-dangling-handle
|
||||
bugprone-dynamic-static-initializers
|
||||
bugprone-empty-catch
|
||||
bugprone-exception-escape
|
||||
bugprone-fold-init-type
|
||||
bugprone-forward-declaration-namespace
|
||||
bugprone-forwarding-reference-overload
|
||||
bugprone-implicit-widening-of-multiplication-result
|
||||
bugprone-inaccurate-erase
|
||||
bugprone-incorrect-roundings
|
||||
bugprone-infinite-loop
|
||||
bugprone-integer-division
|
||||
bugprone-lambda-function-name
|
||||
bugprone-macro-parentheses
|
||||
bugprone-macro-repeated-side-effects
|
||||
bugprone-misplaced-operator-in-strlen-in-alloc
|
||||
bugprone-misplaced-pointer-arithmetic-in-alloc
|
||||
bugprone-misplaced-widening-cast
|
||||
bugprone-move-forwarding-reference
|
||||
bugprone-multiple-new-in-one-expression
|
||||
bugprone-multiple-statement-macro
|
||||
bugprone-narrowing-conversions
|
||||
bugprone-no-escape
|
||||
bugprone-non-zero-enum-to-bool-conversion
|
||||
bugprone-not-null-terminated-result
|
||||
bugprone-parent-virtual-call
|
||||
bugprone-posix-return
|
||||
bugprone-redundant-branch-condition
|
||||
bugprone-reserved-identifier
|
||||
bugprone-shared-ptr-array-mismatch
|
||||
bugprone-signal-handler
|
||||
bugprone-signed-char-misuse
|
||||
bugprone-sizeof-container
|
||||
bugprone-sizeof-expression
|
||||
bugprone-spuriously-wake-up-functions
|
||||
bugprone-standalone-empty
|
||||
bugprone-string-constructor
|
||||
bugprone-string-integer-assignment
|
||||
bugprone-string-literal-with-embedded-nul
|
||||
bugprone-stringview-nullptr
|
||||
bugprone-suspicious-enum-usage
|
||||
bugprone-suspicious-include
|
||||
bugprone-suspicious-memory-comparison
|
||||
bugprone-suspicious-memset-usage
|
||||
bugprone-suspicious-missing-comma
|
||||
bugprone-suspicious-realloc-usage
|
||||
bugprone-suspicious-semicolon
|
||||
bugprone-suspicious-string-compare
|
||||
bugprone-swapped-arguments
|
||||
bugprone-switch-missing-default-case
|
||||
bugprone-terminating-continue
|
||||
bugprone-throw-keyword-missing
|
||||
bugprone-too-small-loop-variable
|
||||
bugprone-unchecked-optional-access
|
||||
bugprone-undefined-memory-manipulation
|
||||
bugprone-undelegated-constructor
|
||||
bugprone-unhandled-exception-at-new
|
||||
bugprone-unhandled-self-assignment
|
||||
bugprone-unique-ptr-array-mismatch
|
||||
bugprone-unsafe-functions
|
||||
bugprone-unused-raii
|
||||
bugprone-unused-return-value
|
||||
bugprone-use-after-move
|
||||
bugprone-virtual-near-miss
|
||||
cert-con36-c
|
||||
cert-con54-cpp
|
||||
cert-dcl03-c
|
||||
cert-dcl16-c
|
||||
cert-dcl21-cpp
|
||||
cert-dcl37-c
|
||||
cert-dcl50-cpp
|
||||
cert-dcl51-cpp
|
||||
cert-dcl54-cpp
|
||||
cert-dcl58-cpp
|
||||
cert-dcl59-cpp
|
||||
cert-env33-c
|
||||
cert-err09-cpp
|
||||
cert-err34-c
|
||||
cert-err52-cpp
|
||||
cert-err58-cpp
|
||||
cert-err60-cpp
|
||||
cert-err61-cpp
|
||||
cert-exp42-c
|
||||
cert-fio38-c
|
||||
cert-flp30-c
|
||||
cert-flp37-c
|
||||
cert-mem57-cpp
|
||||
cert-msc24-c
|
||||
cert-msc30-c
|
||||
cert-msc32-c
|
||||
cert-msc33-c
|
||||
cert-msc50-cpp
|
||||
cert-msc51-cpp
|
||||
cert-msc54-cpp
|
||||
cert-oop11-cpp
|
||||
cert-oop54-cpp
|
||||
cert-oop57-cpp
|
||||
cert-oop58-cpp
|
||||
cert-pos44-c
|
||||
cert-pos47-c
|
||||
cert-sig30-c
|
||||
cert-str34-c
|
||||
clang-analyzer-apiModeling.Errno
|
||||
clang-analyzer-apiModeling.TrustNonnull
|
||||
clang-analyzer-apiModeling.TrustReturnsNonnull
|
||||
clang-analyzer-apiModeling.google.GTest
|
||||
clang-analyzer-apiModeling.llvm.CastValue
|
||||
clang-analyzer-apiModeling.llvm.ReturnValue
|
||||
clang-analyzer-core.CallAndMessage
|
||||
clang-analyzer-core.CallAndMessageModeling
|
||||
clang-analyzer-core.DivideZero
|
||||
clang-analyzer-core.DynamicTypePropagation
|
||||
clang-analyzer-core.NonNullParamChecker
|
||||
clang-analyzer-core.NonnilStringConstants
|
||||
clang-analyzer-core.NullDereference
|
||||
clang-analyzer-core.StackAddrEscapeBase
|
||||
clang-analyzer-core.StackAddressEscape
|
||||
clang-analyzer-core.UndefinedBinaryOperatorResult
|
||||
clang-analyzer-core.VLASize
|
||||
clang-analyzer-core.builtin.BuiltinFunctions
|
||||
clang-analyzer-core.builtin.NoReturnFunctions
|
||||
clang-analyzer-core.uninitialized.ArraySubscript
|
||||
clang-analyzer-core.uninitialized.Assign
|
||||
clang-analyzer-core.uninitialized.Branch
|
||||
clang-analyzer-core.uninitialized.CapturedBlockVariable
|
||||
clang-analyzer-core.uninitialized.NewArraySize
|
||||
clang-analyzer-core.uninitialized.UndefReturn
|
||||
clang-analyzer-cplusplus.InnerPointer
|
||||
clang-analyzer-cplusplus.Move
|
||||
clang-analyzer-cplusplus.NewDelete
|
||||
clang-analyzer-cplusplus.NewDeleteLeaks
|
||||
clang-analyzer-cplusplus.PlacementNew
|
||||
clang-analyzer-cplusplus.PureVirtualCall
|
||||
clang-analyzer-cplusplus.SelfAssignment
|
||||
clang-analyzer-cplusplus.SmartPtrModeling
|
||||
clang-analyzer-cplusplus.StringChecker
|
||||
clang-analyzer-cplusplus.VirtualCallModeling
|
||||
clang-analyzer-deadcode.DeadStores
|
||||
clang-analyzer-fuchsia.HandleChecker
|
||||
clang-analyzer-nullability.NullPassedToNonnull
|
||||
clang-analyzer-nullability.NullReturnedFromNonnull
|
||||
clang-analyzer-nullability.NullabilityBase
|
||||
clang-analyzer-nullability.NullableDereferenced
|
||||
clang-analyzer-nullability.NullablePassedToNonnull
|
||||
clang-analyzer-nullability.NullableReturnedFromNonnull
|
||||
clang-analyzer-optin.cplusplus.UninitializedObject
|
||||
clang-analyzer-optin.cplusplus.VirtualCall
|
||||
clang-analyzer-optin.mpi.MPI-Checker
|
||||
clang-analyzer-optin.osx.OSObjectCStyleCast
|
||||
clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker
|
||||
clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker
|
||||
clang-analyzer-optin.performance.GCDAntipattern
|
||||
clang-analyzer-optin.performance.Padding
|
||||
clang-analyzer-optin.portability.UnixAPI
|
||||
clang-analyzer-osx.API
|
||||
clang-analyzer-osx.MIG
|
||||
clang-analyzer-osx.NSOrCFErrorDerefChecker
|
||||
clang-analyzer-osx.NumberObjectConversion
|
||||
clang-analyzer-osx.OSObjectRetainCount
|
||||
clang-analyzer-osx.ObjCProperty
|
||||
clang-analyzer-osx.SecKeychainAPI
|
||||
clang-analyzer-osx.cocoa.AtSync
|
||||
clang-analyzer-osx.cocoa.AutoreleaseWrite
|
||||
clang-analyzer-osx.cocoa.ClassRelease
|
||||
clang-analyzer-osx.cocoa.Dealloc
|
||||
clang-analyzer-osx.cocoa.IncompatibleMethodTypes
|
||||
clang-analyzer-osx.cocoa.Loops
|
||||
clang-analyzer-osx.cocoa.MissingSuperCall
|
||||
clang-analyzer-osx.cocoa.NSAutoreleasePool
|
||||
clang-analyzer-osx.cocoa.NSError
|
||||
clang-analyzer-osx.cocoa.NilArg
|
||||
clang-analyzer-osx.cocoa.NonNilReturnValue
|
||||
clang-analyzer-osx.cocoa.ObjCGenerics
|
||||
clang-analyzer-osx.cocoa.RetainCount
|
||||
clang-analyzer-osx.cocoa.RetainCountBase
|
||||
clang-analyzer-osx.cocoa.RunLoopAutoreleaseLeak
|
||||
clang-analyzer-osx.cocoa.SelfInit
|
||||
clang-analyzer-osx.cocoa.SuperDealloc
|
||||
clang-analyzer-osx.cocoa.UnusedIvars
|
||||
clang-analyzer-osx.cocoa.VariadicMethodTypes
|
||||
clang-analyzer-osx.coreFoundation.CFError
|
||||
clang-analyzer-osx.coreFoundation.CFNumber
|
||||
clang-analyzer-osx.coreFoundation.CFRetainRelease
|
||||
clang-analyzer-osx.coreFoundation.containers.OutOfBounds
|
||||
clang-analyzer-osx.coreFoundation.containers.PointerSizedValues
|
||||
clang-analyzer-security.FloatLoopCounter
|
||||
clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
|
||||
clang-analyzer-security.insecureAPI.SecuritySyntaxChecker
|
||||
clang-analyzer-security.insecureAPI.UncheckedReturn
|
||||
clang-analyzer-security.insecureAPI.bcmp
|
||||
clang-analyzer-security.insecureAPI.bcopy
|
||||
clang-analyzer-security.insecureAPI.bzero
|
||||
clang-analyzer-security.insecureAPI.decodeValueOfObjCType
|
||||
clang-analyzer-security.insecureAPI.getpw
|
||||
clang-analyzer-security.insecureAPI.gets
|
||||
clang-analyzer-security.insecureAPI.mkstemp
|
||||
clang-analyzer-security.insecureAPI.mktemp
|
||||
clang-analyzer-security.insecureAPI.rand
|
||||
clang-analyzer-security.insecureAPI.strcpy
|
||||
clang-analyzer-security.insecureAPI.vfork
|
||||
clang-analyzer-unix.API
|
||||
clang-analyzer-unix.DynamicMemoryModeling
|
||||
clang-analyzer-unix.Malloc
|
||||
clang-analyzer-unix.MallocSizeof
|
||||
clang-analyzer-unix.MismatchedDeallocator
|
||||
clang-analyzer-unix.Vfork
|
||||
clang-analyzer-unix.cstring.BadSizeArg
|
||||
clang-analyzer-unix.cstring.CStringModeling
|
||||
clang-analyzer-unix.cstring.NullArg
|
||||
clang-analyzer-valist.CopyToSelf
|
||||
clang-analyzer-valist.Uninitialized
|
||||
clang-analyzer-valist.Unterminated
|
||||
clang-analyzer-valist.ValistBase
|
||||
clang-analyzer-webkit.NoUncountedMemberChecker
|
||||
clang-analyzer-webkit.RefCntblBaseVirtualDtor
|
||||
clang-analyzer-webkit.UncountedLambdaCapturesChecker
|
||||
concurrency-mt-unsafe
|
||||
concurrency-thread-canceltype-asynchronous
|
||||
cppcoreguidelines-avoid-c-arrays
|
||||
cppcoreguidelines-avoid-capturing-lambda-coroutines
|
||||
cppcoreguidelines-avoid-const-or-ref-data-members
|
||||
cppcoreguidelines-avoid-do-while
|
||||
cppcoreguidelines-avoid-goto
|
||||
cppcoreguidelines-avoid-non-const-global-variables
|
||||
cppcoreguidelines-avoid-reference-coroutine-parameters
|
||||
cppcoreguidelines-c-copy-assignment-signature
|
||||
cppcoreguidelines-explicit-virtual-functions
|
||||
cppcoreguidelines-init-variables
|
||||
cppcoreguidelines-interfaces-global-init
|
||||
cppcoreguidelines-macro-usage
|
||||
cppcoreguidelines-misleading-capture-default-by-value
|
||||
cppcoreguidelines-missing-std-forward
|
||||
cppcoreguidelines-narrowing-conversions
|
||||
cppcoreguidelines-no-malloc
|
||||
cppcoreguidelines-noexcept-destructor
|
||||
cppcoreguidelines-noexcept-move-operations
|
||||
cppcoreguidelines-noexcept-swap
|
||||
cppcoreguidelines-prefer-member-initializer
|
||||
cppcoreguidelines-pro-type-const-cast
|
||||
cppcoreguidelines-pro-type-cstyle-cast
|
||||
cppcoreguidelines-pro-type-member-init
|
||||
cppcoreguidelines-pro-type-static-cast-downcast
|
||||
cppcoreguidelines-pro-type-union-access
|
||||
cppcoreguidelines-pro-type-vararg
|
||||
cppcoreguidelines-rvalue-reference-param-not-moved
|
||||
cppcoreguidelines-slicing
|
||||
cppcoreguidelines-use-default-member-init
|
||||
cppcoreguidelines-virtual-class-destructor
|
||||
darwin-avoid-spinlock
|
||||
darwin-dispatch-once-nonstatic
|
||||
google-build-explicit-make-pair
|
||||
google-build-namespaces
|
||||
google-build-using-namespace
|
||||
google-default-arguments
|
||||
google-explicit-constructor
|
||||
google-global-names-in-headers
|
||||
google-objc-avoid-nsobject-new
|
||||
google-objc-avoid-throwing-exception
|
||||
google-objc-function-naming
|
||||
google-objc-global-variable-declaration
|
||||
google-readability-avoid-underscore-in-googletest-name
|
||||
google-readability-casting
|
||||
google-readability-function-size
|
||||
google-readability-namespace-comments
|
||||
google-runtime-int
|
||||
google-runtime-operator
|
||||
google-upgrade-googletest-case
|
||||
hicpp-avoid-c-arrays
|
||||
hicpp-avoid-goto
|
||||
hicpp-deprecated-headers
|
||||
hicpp-exception-baseclass
|
||||
hicpp-explicit-conversions
|
||||
hicpp-function-size
|
||||
hicpp-invalid-access-moved
|
||||
hicpp-member-init
|
||||
hicpp-move-const-arg
|
||||
hicpp-multiway-paths-covered
|
||||
hicpp-named-parameter
|
||||
hicpp-new-delete-operators
|
||||
hicpp-no-assembler
|
||||
hicpp-no-malloc
|
||||
hicpp-noexcept-move
|
||||
hicpp-static-assert
|
||||
hicpp-undelegated-constructor
|
||||
hicpp-uppercase-literal-suffix
|
||||
hicpp-use-auto
|
||||
hicpp-use-emplace
|
||||
hicpp-use-equals-default
|
||||
hicpp-use-equals-delete
|
||||
hicpp-use-noexcept
|
||||
hicpp-use-nullptr
|
||||
hicpp-use-override
|
||||
hicpp-vararg
|
||||
linuxkernel-must-check-errs
|
||||
llvm-else-after-return
|
||||
llvm-include-order
|
||||
llvm-namespace-comment
|
||||
llvm-prefer-isa-or-dyn-cast-in-conditionals
|
||||
llvm-prefer-register-over-unsigned
|
||||
llvm-qualified-auto
|
||||
llvm-twine-local
|
||||
misc-confusable-identifiers
|
||||
misc-const-correctness
|
||||
misc-definitions-in-headers
|
||||
misc-header-include-cycle
|
||||
misc-misleading-bidirectional
|
||||
misc-misleading-identifier
|
||||
misc-misplaced-const
|
||||
misc-new-delete-overloads
|
||||
misc-no-recursion
|
||||
misc-non-copyable-objects
|
||||
misc-redundant-expression
|
||||
misc-static-assert
|
||||
misc-throw-by-value-catch-by-reference
|
||||
misc-unconventional-assign-operator
|
||||
misc-uniqueptr-reset-release
|
||||
misc-unused-alias-decls
|
||||
misc-unused-parameters
|
||||
misc-unused-using-decls
|
||||
misc-use-anonymous-namespace
|
||||
modernize-avoid-bind
|
||||
modernize-avoid-c-arrays
|
||||
modernize-concat-nested-namespaces
|
||||
modernize-deprecated-headers
|
||||
modernize-deprecated-ios-base-aliases
|
||||
modernize-loop-convert
|
||||
modernize-macro-to-enum
|
||||
modernize-make-shared
|
||||
modernize-make-unique
|
||||
modernize-raw-string-literal
|
||||
modernize-redundant-void-arg
|
||||
modernize-replace-auto-ptr
|
||||
modernize-replace-disallow-copy-and-assign-macro
|
||||
modernize-replace-random-shuffle
|
||||
modernize-return-braced-init-list
|
||||
modernize-shrink-to-fit
|
||||
modernize-type-traits
|
||||
modernize-unary-static-assert
|
||||
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-noexcept
|
||||
modernize-use-nullptr
|
||||
modernize-use-override
|
||||
modernize-use-std-print
|
||||
modernize-use-transparent-functors
|
||||
modernize-use-uncaught-exceptions
|
||||
modernize-use-using
|
||||
mpi-buffer-deref
|
||||
mpi-type-mismatch
|
||||
objc-assert-equals
|
||||
objc-avoid-nserror-init
|
||||
objc-dealloc-in-category
|
||||
objc-forbidden-subclassing
|
||||
objc-missing-hash
|
||||
objc-nsdate-formatter
|
||||
objc-nsinvocation-argument-lifetime
|
||||
objc-property-declaration
|
||||
objc-super-self
|
||||
openmp-exception-escape
|
||||
openmp-use-default-none
|
||||
performance-avoid-endl
|
||||
performance-faster-string-find
|
||||
performance-for-range-copy
|
||||
performance-implicit-conversion-in-loop
|
||||
performance-inefficient-algorithm
|
||||
performance-inefficient-string-concatenation
|
||||
performance-inefficient-vector-operation
|
||||
performance-move-const-arg
|
||||
performance-move-constructor-init
|
||||
performance-no-automatic-move
|
||||
performance-no-int-to-ptr
|
||||
performance-noexcept-destructor
|
||||
performance-noexcept-move-constructor
|
||||
performance-noexcept-swap
|
||||
performance-trivially-destructible
|
||||
performance-type-promotion-in-math-fn
|
||||
performance-unnecessary-copy-initialization
|
||||
performance-unnecessary-value-param
|
||||
portability-restrict-system-includes
|
||||
portability-simd-intrinsics
|
||||
portability-std-allocator-const
|
||||
readability-avoid-unconditional-preprocessor-if
|
||||
readability-const-return-type
|
||||
readability-container-contains
|
||||
readability-container-data-pointer
|
||||
readability-container-size-empty
|
||||
readability-convert-member-functions-to-static
|
||||
readability-delete-null-pointer
|
||||
readability-duplicate-include
|
||||
readability-function-cognitive-complexity
|
||||
readability-function-size
|
||||
readability-inconsistent-declaration-parameter-name
|
||||
readability-make-member-function-const
|
||||
readability-misleading-indentation
|
||||
readability-misplaced-array-index
|
||||
readability-named-parameter
|
||||
readability-non-const-parameter
|
||||
readability-operators-representation
|
||||
readability-qualified-auto
|
||||
readability-redundant-access-specifiers
|
||||
readability-redundant-control-flow
|
||||
readability-redundant-declaration
|
||||
readability-redundant-function-ptr-dereference
|
||||
readability-redundant-member-init
|
||||
readability-redundant-preprocessor
|
||||
readability-redundant-smartptr-get
|
||||
readability-redundant-string-cstr
|
||||
readability-redundant-string-init
|
||||
readability-simplify-boolean-expr
|
||||
readability-simplify-subscript-expr
|
||||
readability-static-definition-in-anonymous-namespace
|
||||
readability-string-compare
|
||||
readability-suspicious-call-argument
|
||||
readability-uniqueptr-delete-release
|
||||
readability-uppercase-literal-suffix
|
||||
readability-use-anyofallof
|
||||
zircon-temporary-objects
|
||||
Checks: '*,
|
||||
-abseil-*
|
||||
-readability-magic-numbers,
|
||||
-misc-include-cleaner,
|
||||
-cppcoreguidelines-avoid-magic-numbers,
|
||||
-cppcoreguidelines-owning-memory,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-cppcoreguidelines-non-private-member-variables-in-classes,
|
||||
-cppcoreguidelines-special-member-functions,
|
||||
-hicpp-special-member-functions,
|
||||
-cert-err33-c,
|
||||
-modernize-pass-by-value,
|
||||
-altera-*,
|
||||
-android-cloexec-fopen,
|
||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
||||
-fuchsia*,
|
||||
-readability-else-after-return,
|
||||
-readability-avoid-const-params-in-decls,
|
||||
-readability-identifier-length,
|
||||
-cppcoreguidelines-pro-bounds-constant-array-index,
|
||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||
-llvm-header-guard,
|
||||
-modernize-use-nodiscard,
|
||||
-misc-non-private-member-variables-in-classes,
|
||||
-readability-static-accessed-through-instance,
|
||||
-readability-braces-around-statements,
|
||||
-readability-isolate-declaration,
|
||||
-readability-implicit-bool-conversion,
|
||||
-readability-identifier-length,
|
||||
-readability-identifier-naming,
|
||||
-hicpp-signed-bitwise,
|
||||
-hicpp-no-array-decay,
|
||||
-hicpp-braces-around-statements,
|
||||
-google-runtime-references,
|
||||
-google-readability-todo,
|
||||
-google-readability-braces-around-statements,
|
||||
-modernize-use-trailing-return-type,
|
||||
-llvmlibc-*
|
||||
'
|
||||
|
||||
HeaderFilterRegex: \.h
|
||||
HeaderFilterRegex: '*.hpp'
|
||||
ImplementationFileExtensions: [cpp]
|
||||
AnalyzeTemporaryDtors: false
|
||||
WarningsAsErrors: '*'
|
||||
FormatStyle: none
|
||||
CheckOptions:
|
||||
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
|
||||
|
16
.github/workflows/clang-tidy.yml
vendored
16
.github/workflows/clang-tidy.yml
vendored
@ -8,23 +8,29 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mamba-org/setup-micromamba@v1
|
||||
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
|
||||
with:
|
||||
micromamba-version: '1.5.6-0' # any version from https://github.com/mamba-org/micromamba-releases
|
||||
environment-file: aare-environment.yml
|
||||
init-shell: bash
|
||||
cache-environment: true
|
||||
post-cleanup: 'all'
|
||||
- name: update clang-tidy
|
||||
shell: bash -el {0}
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 17
|
||||
sudo apt install clang-tidy-17
|
||||
- name: cmake
|
||||
shell: bash -el {0}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_LIBRARIES=ON ..
|
||||
cmake .. -DAARE_SYSTEM_LIBRARIES="ON" -DCMAKE_BUILD_TYPE="Debug" -DAARE_PYTHON_BINDINGS="OFF" -DAARE_IN_GITHUB_ACTIONS="ON"
|
||||
- name: linting checks
|
||||
shell: bash -el {0}
|
||||
run: |
|
||||
# find all examples in build/examples and run them
|
||||
clang-tidy-17 --version
|
||||
echo $GITHUB_ACTIONS
|
||||
cd build
|
||||
cmake --build . --target clang-tidy
|
||||
|
||||
cmake --build . --target clang-tidy
|
26
.github/workflows/common-workflow.yml
vendored
26
.github/workflows/common-workflow.yml
vendored
@ -19,6 +19,32 @@ jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
JOB_CONTEXT: ${{ toJson(job) }}
|
||||
STEPS_CONTEXT: ${{ toJson(steps) }}
|
||||
RUNNER_CONTEXT: ${{ toJson(runner) }}
|
||||
run: |
|
||||
echo "$GITHUB_CONTEXT"
|
||||
echo "$JOB_CONTEXT"
|
||||
echo "$STEPS_CONTEXT"
|
||||
echo "$RUNNER_CONTEXT"
|
||||
echo "The job_id is: $GITHUB_JOB" # reference the default environment variables
|
||||
echo "The id of this action is: $GITHUB_ACTION" # reference the default environment variables
|
||||
echo "The run id is: $GITHUB_RUN_ID"
|
||||
echo "The GitHub Actor's username is: $GITHUB_ACTOR"
|
||||
echo "GitHub SHA: $GITHUB_SHA"
|
||||
|
||||
- name: print inputs
|
||||
run: |
|
||||
echo "use-system-libraries: ${{inputs.use-system-libraries}}"
|
||||
echo "build-type: ${{inputs.build-type}}"
|
||||
echo "use-python-bindings: ${{inputs.use-python-bindings}}"
|
||||
|
||||
|
||||
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mamba-org/setup-micromamba@v1
|
||||
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
|
||||
|
3
.github/workflows/format.yml
vendored
3
.github/workflows/format.yml
vendored
@ -8,7 +8,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mamba-org/setup-micromamba@v1
|
||||
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
|
||||
with:
|
||||
micromamba-version: '1.5.6-0' # any version from https://github.com/mamba-org/micromamba-releases
|
||||
environment-file: aare-environment.yml
|
||||
@ -20,7 +19,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_LIBRARIES=ON ..
|
||||
cmake .. -DAARE_SYSTEM_LIBRARIES="ON" -DCMAKE_BUILD_TYPE="Debug" -DAARE_PYTHON_BINDINGS="OFF" -DAARE_IN_GITHUB_ACTIONS="ON"
|
||||
- name: linting checks
|
||||
shell: bash -el {0}
|
||||
run: |
|
||||
|
@ -26,6 +26,7 @@ option(AARE_USE_WARNINGS "Eable warnings" ON)
|
||||
option(AARE_PYTHON_BINDINGS "Build python bindings" ON)
|
||||
option(AARE_TESTS "Build tests" ON)
|
||||
option(AARE_EXAMPLES "Build examples" ON)
|
||||
option(AARE_IN_GITHUB_ACTIONS "Running in Github Actions" OFF)
|
||||
|
||||
option(AARE_FETCH_FMT "Use FetchContent to download fmt" ON)
|
||||
option(AARE_FETCH_PYBIND11 "Use FetchContent to download pybind11" ON)
|
||||
@ -211,9 +212,17 @@ add_custom_target(
|
||||
COMMENT "Formatting with clang-format"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
if (AARE_IN_GITHUB_ACTIONS)
|
||||
message(STATUS "Running in Github Actions")
|
||||
set(CLANG_TIDY_COMMAND "clang-tidy-17")
|
||||
else()
|
||||
set(CLANG_TIDY_COMMAND "clang-tidy")
|
||||
endif()
|
||||
|
||||
add_custom_target(
|
||||
clang-tidy
|
||||
COMMAND find \( -path "./core/*" -o -path "./file_io/*" -o -path "./network_io/*" -o -path "./utils/*" \) \( -name "*.cpp" \) -not -path "./python/*" -not -name "*.test.cpp" -not -name "CircularFifo.hpp" -not -name "ProducerConsumerQueue.hpp" -not -name "VariableSizeClusterFinder.hpp" | xargs -I {} -n 1 -P 10 bash -c "clang-tidy --config-file=.clang-tidy -p build {}"
|
||||
COMMAND find \( -path "./core/*" -o -path "./file_io/*" -o -path "./network_io/*" -o -path "./utils/*" \) -name "*.cpp" -not -name "*.test.cpp" -not -name "CircularFifo.hpp" -not -name "ProducerConsumerQueue.hpp" -not -name "VariableSizeClusterFinder.hpp" | xargs -I {} -n 1 -P 10 bash -c "${CLANG_TIDY_COMMAND} --config-file=.clang-tidy -p build {}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "linting with clang-tidy"
|
||||
VERBATIM
|
||||
|
Loading…
x
Reference in New Issue
Block a user