From 92e5937cc7b5cf228777f3c2764f6250d6043c18 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sat, 8 Mar 2025 09:35:12 -0500 Subject: [PATCH] Add default options for enabled clang-tidy checks. --- .clang-tidy | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 145 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index b42ea9a..28806d5 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -143,4 +143,148 @@ readability-static-accessed-through-instance, readability-static-definition-in-anonymous-namespace, readability-string-compare, readability-uniqueptr-delete-release, -readability-use-anyofallof' \ No newline at end of file +readability-use-anyofallof' +CheckOptions: + bugprone-argument-comment.CommentBoolLiterals: '0' + bugprone-argument-comment.CommentCharacterLiterals: '0' + bugprone-argument-comment.CommentFloatLiterals: '0' + bugprone-argument-comment.CommentIntegerLiterals: '0' + bugprone-argument-comment.CommentNullPtrs: '0' + bugprone-argument-comment.CommentStringLiterals: '0' + bugprone-argument-comment.CommentUserDefinedLiterals: '0' + bugprone-argument-comment.IgnoreSingleArgument: '0' + bugprone-argument-comment.StrictMode: '0' + bugprone-assert-side-effect.AssertMacros: assert,NSAssert,NSCAssert + bugprone-assert-side-effect.CheckFunctionCalls: 'false' + bugprone-assert-side-effect.IgnoredFunctions: __builtin_expect + bugprone-dangling-handle.HandleClasses: 'std::basic_string_view;std::experimental::basic_string_view' + bugprone-dynamic-static-initializers.HeaderFileExtensions: ';h;hh;hpp;hxx' + bugprone-lambda-function-name.IgnoreMacros: 'false' + bugprone-misplaced-widening-cast.CheckImplicitCasts: 'false' + bugprone-not-null-terminated-result.WantToUseSafeFunctions: 'true' + bugprone-reserved-identifier.AggressiveDependentMemberLookup: 'false' + bugprone-reserved-identifier.AllowedIdentifiers: '' + bugprone-reserved-identifier.Invert: 'false' + bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant: 'true' + bugprone-sizeof-expression.WarnOnSizeOfConstant: 'true' + bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression: 'false' + bugprone-sizeof-expression.WarnOnSizeOfPointerToAggregate: 'true' + bugprone-sizeof-expression.WarnOnSizeOfThis: 'true' + bugprone-string-constructor.LargeLengthThreshold: '8388608' + bugprone-string-constructor.StringNames: '::std::basic_string;::std::basic_string_view' + bugprone-string-constructor.WarnOnLargeLength: 'true' + bugprone-suspicious-enum-usage.StrictMode: 'false' + bugprone-suspicious-include.HeaderFileExtensions: ';h;hh;hpp;hxx' + bugprone-suspicious-include.ImplementationFileExtensions: 'c;cc;cpp;cxx' + bugprone-suspicious-missing-comma.MaxConcatenatedTokens: '5' + bugprone-suspicious-missing-comma.RatioThreshold: '0.200000' + bugprone-suspicious-missing-comma.SizeThreshold: '5' + bugprone-suspicious-string-compare.StringCompareLikeFunctions: '' + bugprone-suspicious-string-compare.WarnOnImplicitComparison: 'true' + bugprone-suspicious-string-compare.WarnOnLogicalNotComparison: 'false' + bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit: '16' + bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField: 'true' + bugprone-unused-return-value.AllowCastToVoid: 'false' + bugprone-unused-return-value.CheckedFunctions: '::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty;::std::back_inserter;::std::distance;::std::find;::std::find_if;::std::inserter;::std::lower_bound;::std::make_pair;::std::map::count;::std::map::find;::std::map::lower_bound;::std::multimap::equal_range;::std::multimap::upper_bound;::std::set::count;::std::set::find;::std::setfill;::std::setprecision;::std::setw;::std::upper_bound;::std::vector::at;::bsearch;::ferror;::feof;::isalnum;::isalpha;::isblank;::iscntrl;::isdigit;::isgraph;::islower;::isprint;::ispunct;::isspace;::isupper;::iswalnum;::iswprint;::iswspace;::isxdigit;::memchr;::memcmp;::strcmp;::strcoll;::strncmp;::strpbrk;::strrchr;::strspn;::strstr;::wcscmp;::access;::bind;::connect;::difftime;::dlsym;::fnmatch;::getaddrinfo;::getopt;::htonl;::htons;::iconv_open;::inet_addr;::isascii;::isatty;::mmap;::newlocale;::openat;::pathconf;::pthread_equal;::pthread_getspecific;::pthread_mutex_trylock;::readdir;::readlink;::recvmsg;::regexec;::scandir;::semget;::setjmp;::shm_open;::shmget;::sigismember;::strcasecmp;::strsignal;::ttyname' + bugprone-unused-return-value.CheckedReturnTypes: '::std::error_code;::std::error_condition;::std::errc;::std::expected;::boost::system::error_code' + cert-dcl16-c.NewSuffixes: 'L;LL;LU;LLU' + cert-err33-c.AllowCastToVoid: 'true' + cert-err33-c.CheckedFunctions: '::aligned_alloc;::asctime_s;::at_quick_exit;::atexit;::bsearch;::bsearch_s;::btowc;::c16rtomb;::c32rtomb;::calloc;::clock;::cnd_broadcast;::cnd_init;::cnd_signal;::cnd_timedwait;::cnd_wait;::ctime_s;::fclose;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fopen_s;::fprintf;::fprintf_s;::fputc;::fputs;::fputwc;::fputws;::fread;::freopen;::freopen_s;::fscanf;::fscanf_s;::fseek;::fsetpos;::ftell;::fwprintf;::fwprintf_s;::fwrite;::fwscanf;::fwscanf_s;::getc;::getchar;::getenv;::getenv_s;::gets_s;::getwc;::getwchar;::gmtime;::gmtime_s;::localtime;::localtime_s;::malloc;::mbrtoc16;::mbrtoc32;::mbsrtowcs;::mbsrtowcs_s;::mbstowcs;::mbstowcs_s;::memchr;::mktime;::mtx_init;::mtx_lock;::mtx_timedlock;::mtx_trylock;::mtx_unlock;::printf_s;::putc;::putwc;::raise;::realloc;::remove;::rename;::scanf;::scanf_s;::setlocale;::setvbuf;::signal;::snprintf;::snprintf_s;::sprintf;::sprintf_s;::sscanf;::sscanf_s;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtok_s;::strtol;::strtold;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swprintf_s;::swscanf;::swscanf_s;::thrd_create;::thrd_detach;::thrd_join;::thrd_sleep;::time;::timespec_get;::tmpfile;::tmpfile_s;::tmpnam;::tmpnam_s;::tss_create;::tss_get;::tss_set;::ungetc;::ungetwc;::vfprintf;::vfprintf_s;::vfscanf;::vfscanf_s;::vfwprintf;::vfwprintf_s;::vfwscanf;::vfwscanf_s;::vprintf_s;::vscanf;::vscanf_s;::vsnprintf;::vsnprintf_s;::vsprintf;::vsprintf_s;::vsscanf;::vsscanf_s;::vswprintf;::vswprintf_s;::vswscanf;::vswscanf_s;::vwprintf_s;::vwscanf;::vwscanf_s;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsrtombs_s;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstok_s;::wcstol;::wcstold;::wcstoll;::wcstombs;::wcstombs_s;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wctrans;::wctype;::wmemchr;::wprintf_s;::wscanf;::wscanf_s;' + cert-msc51-cpp.DisallowedSeedTypes: 'time_t,std::time_t' + cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField: 'false' + cert-str34-c.CharTypdefsToIgnore: '' + cert-str34-c.DiagnoseSignedUnsignedCharComparisons: 'false' + cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic: 'true' + cppcoreguidelines-pro-type-member-init.IgnoreArrays: 'false' + cppcoreguidelines-pro-type-member-init.UseAssignment: 'false' + cppcoreguidelines-pro-type-static-cast-downcast.StrictMode: 'true' + google-readability-braces-around-statements.ShortStatementLines: '1' + google-readability-function-size.StatementThreshold: '800' + google-readability-namespace-comments.ShortNamespaceLines: '10' + google-readability-namespace-comments.SpacesBeforeComments: '2' + hicpp-multiway-paths-covered.WarnOnMissingElse: 'false' + llvm-else-after-return.WarnOnConditionVariables: 'false' + llvm-else-after-return.WarnOnUnfixable: 'false' + llvm-qualified-auto.AddConstToQualified: 'false' + misc-throw-by-value-catch-by-reference.CheckThrowTemporaries: 'true' + misc-throw-by-value-catch-by-reference.MaxSize: '-1' + misc-throw-by-value-catch-by-reference.WarnOnLargeObjects: 'false' + misc-uniqueptr-reset-release.IncludeStyle: llvm + modernize-avoid-bind.PermissiveParameterList: 'false' + modernize-deprecated-headers.CheckHeaderFile: 'false' + modernize-loop-convert.IncludeStyle: llvm + modernize-loop-convert.MakeReverseRangeFunction: '' + modernize-loop-convert.MakeReverseRangeHeader: '' + modernize-loop-convert.MaxCopySize: '16' + modernize-loop-convert.MinConfidence: reasonable + modernize-loop-convert.NamingStyle: CamelCase + modernize-loop-convert.UseCxx20ReverseRanges: 'true' + modernize-make-shared.IgnoreDefaultInitialization: 'true' + modernize-make-shared.IgnoreMacros: 'true' + modernize-make-shared.IncludeStyle: llvm + modernize-make-shared.MakeSmartPtrFunction: 'std::make_shared' + modernize-make-shared.MakeSmartPtrFunctionHeader: '' + modernize-make-unique.IgnoreDefaultInitialization: 'true' + modernize-make-unique.IgnoreMacros: 'true' + modernize-make-unique.IncludeStyle: llvm + modernize-make-unique.MakeSmartPtrFunction: 'std::make_unique' + modernize-make-unique.MakeSmartPtrFunctionHeader: '' + modernize-pass-by-value.IncludeStyle: llvm + modernize-pass-by-value.ValuesOnly: 'false' + modernize-raw-string-literal.DelimiterStem: lit + modernize-raw-string-literal.ReplaceShorterLiterals: 'false' + modernize-replace-auto-ptr.IncludeStyle: llvm + modernize-replace-disallow-copy-and-assign-macro.MacroName: DISALLOW_COPY_AND_ASSIGN + modernize-replace-random-shuffle.IncludeStyle: llvm + modernize-use-auto.MinTypeNameLength: '5' + modernize-use-auto.RemoveStars: 'false' + modernize-use-bool-literals.IgnoreMacros: 'true' + modernize-use-emplace.ContainersWithPush: '::std::stack;::std::queue;::std::priority_queue' + modernize-use-emplace.ContainersWithPushBack: '::std::vector;::std::list;::std::deque' + modernize-use-emplace.ContainersWithPushFront: '::std::forward_list;::std::list;::std::deque' + modernize-use-emplace.EmplacyFunctions: 'vector::emplace_back;vector::emplace;deque::emplace;deque::emplace_front;deque::emplace_back;forward_list::emplace_after;forward_list::emplace_front;list::emplace;list::emplace_back;list::emplace_front;set::emplace;set::emplace_hint;map::emplace;map::emplace_hint;multiset::emplace;multiset::emplace_hint;multimap::emplace;multimap::emplace_hint;unordered_set::emplace;unordered_set::emplace_hint;unordered_map::emplace;unordered_map::emplace_hint;unordered_multiset::emplace;unordered_multiset::emplace_hint;unordered_multimap::emplace;unordered_multimap::emplace_hint;stack::emplace;queue::emplace;priority_queue::emplace' + modernize-use-emplace.IgnoreImplicitConstructors: 'false' + modernize-use-emplace.SmartPointers: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr' + modernize-use-emplace.TupleMakeFunctions: '::std::make_pair;::std::make_tuple' + modernize-use-emplace.TupleTypes: '::std::pair;::std::tuple' + modernize-use-equals-default.IgnoreMacros: 'true' + modernize-use-equals-delete.IgnoreMacros: 'true' + modernize-use-nodiscard.ReplacementString: '[[nodiscard]]' + modernize-use-noexcept.ReplacementString: '' + modernize-use-noexcept.UseNoexceptFalse: 'true' + modernize-use-nullptr.IgnoredTypes: 'std::_CmpUnspecifiedParam::;^std::__cmp_cat::__unspec' + modernize-use-nullptr.NullMacros: 'NULL' + modernize-use-override.AllowOverrideAndFinal: 'false' + modernize-use-override.FinalSpelling: final + modernize-use-override.IgnoreDestructors: 'false' + modernize-use-override.IgnoreTemplateInstantiations: 'false' + modernize-use-override.OverrideSpelling: override + modernize-use-transparent-functors.SafeMode: 'false' + performance-faster-string-find.StringLikeClasses: '::std::basic_string;::std::basic_string_view' + performance-for-range-copy.AllowedTypes: '' + performance-for-range-copy.WarnOnAllAutoCopies: 'false' + performance-inefficient-string-concatenation.StrictMode: 'false' + performance-inefficient-vector-operation.EnableProto: 'false' + performance-inefficient-vector-operation.VectorLikeClasses: '::std::vector' + performance-move-const-arg.CheckMoveToConstRef: 'true' + performance-move-const-arg.CheckTriviallyCopyableMove: 'true' + performance-no-automatic-move.AllowedTypes: '' + performance-type-promotion-in-math-fn.IncludeStyle: llvm + performance-unnecessary-copy-initialization.AllowedTypes: '' + performance-unnecessary-copy-initialization.ExcludedContainerTypes: '' + performance-unnecessary-value-param.AllowedTypes: '' + performance-unnecessary-value-param.IncludeStyle: llvm + portability-simd-intrinsics.Std: '' + portability-simd-intrinsics.Suggest: 'false' + readability-avoid-const-params-in-decls.IgnoreMacros: 'true' + readability-braces-around-statements.ShortStatementLines: '0' + readability-const-return-type.IgnoreMacros: 'true' + readability-container-size-empty.ExcludedComparisonTypes: '::std::array' + readability-inconsistent-declaration-parameter-name.IgnoreMacros: 'true' + readability-inconsistent-declaration-parameter-name.Strict: 'false' + readability-redundant-declaration.IgnoreMacros: 'true' + readability-redundant-smartptr-get.IgnoreMacros: 'true' + readability-redundant-string-init.StringNames: '::std::basic_string_view;::std::basic_string' + readability-simplify-subscript-expr.Types: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array;::std::span' + readability-static-accessed-through-instance.NameSpecifierNestingThreshold: '3' + readability-uniqueptr-delete-release.PreferResetCall: 'false' \ No newline at end of file