summaryrefslogtreecommitdiffstats
path: root/library/cpp/threading/thread_local
diff options
context:
space:
mode:
authorvitya-smirnov <[email protected]>2025-11-25 14:42:02 +0300
committervitya-smirnov <[email protected]>2025-11-25 15:17:10 +0300
commitbe643a543711e2ce9205f3d7446435086e043d6d (patch)
treec283f7dd34f9ec3fa64464f1018f41c0ba5816e3 /library/cpp/threading/thread_local
parentc57ce00b9b446e9127ae7721ec4bf63ba50f353f (diff)
YQL-20086: Enable arcadia and bugprone checks
This patch enables more Clang Tidy checks for the `yql/essentials` project. I chosen the policy to enable all checks by default because - It will keep us updated when new checks are become available in the DevTools whitelist. - You never know what check will be useful, even if it was not fired now. Why some checks from the https://nda.ya.ru/t/8QnKCVIO7NWhBD were disabled? - `arcadia-taxi-` checks are `userver`-specific. - `bugprone-bool-pointer-implicit-conversion` is not applicable to our codebase as we heavily used to it. - `bugprone-branch-clone` triggered on a code that is not obviously rewrittable and not so poor. - `bugprone-dynamic-static-initializers` are heavily used in our codebase especially in the translator. Static variables with dynamic initialization are so common, so refactor them is too hard and requires huge code rewritting to deliver some hardcoded configuration values via ctors, having them in a one place. - `bugprone-exception-escape` is useful check for programs where the care of exception safety is taken, but we a lot of places where exception can be thrown from the destructor or move-operator. I left a TODO in the `.clang-tidy` to fix this. Maybe will create a ticket. - `bugprone-lambda-function-name` appears when we throw an exception from the lambda. I think, that this is okay and do not see any options to fix it. - `bugprone-macro-parentheses` had false positives at `YQL_ENSURE` second argument and also broke some code, by surrounding `A` at `template <class A>`. - `bugprone-misplaced-widening-cast`, `bugprone-narrowing-conversions`, `bugprone-signed-char-misuse` are disabled because checking arithmetics correctness is hard and non-trivial. I am not sure that it worth spending a lot of time on it as everything seems to work well :o) - `bugprone-reserved-identifier` was triggered on some harmless identifier in computation, so I decided just to turn this off, rather than argue with someone. - `bugprone-suspicious-enum-usage` happend on Arcadia HTTP client usage. Do not think that it is worth to argue with Arcadia HTTP client code owners. - `bugprone-suspicious-memory-comparison` happened in some compuration test. I just decided to trust low-level code authors. - `bugprone-too-small-loop-variable` seems not really a problem and lets you safe some symbols on `static_cast`s. - `bugprone-sizeof-expression` had so many false positives at computation. - `bugprone-unchecked-optional-access` a good check, but optionals are dereferenced everywhere in our codebase. Of course, in a perfect world near each of such dereference should be an assertion with comment why it is a valid action, because when static analysis can not infer that the value is non-null, then it is not an obvious thing for a human also. But we a too far from such code quality now. - `bugprone-undefined-memory-manipulation` is interesting. It argued on some `memcpy` at computation. There was some `UnboxedValues` array and this objects have some logic of memory marking and releasing under an `NDEBUG`. I added a TODO to check this. Maybe will create a ticket. - `bugprone-unhandled-self-assignment` has false positives on non-owning objects such as iterators. commit_hash:c0c0de6b157bf095eb681bdea55ada47845de814
Diffstat (limited to 'library/cpp/threading/thread_local')
0 files changed, 0 insertions, 0 deletions