coturn/.clang-tidy
Michael Jones 98d91a73cf
Improve const correctness in coturn (#1424)
Marking variables as const when they won't be modified after
initialization helps programmers trying to understand a codebase to
manage the cognative load.

This pull request uses a clang-tidy fixit (Hard to automate, since the
code needs to be temporarily compiled as C++ for it to work) to try to
mechanically apply the const keyword to code where the automated tool
can determine that the variable won't be modified.

I then follow this up with a manual improvement pass to
turnutils_uclient, where I address const correctness of local variables,
as well as do some adjustments to loops and scoping to help with
reducing complexity.

Co-authored-by: redraincatching <redraincatching@disroot.org>
Co-authored-by: Pavel Punsky <eakraly@users.noreply.github.com>
2025-09-08 21:14:56 -07:00

27 lines
820 B
YAML

---
Checks: 'clang-diagnostic-*,
,-clang-diagnostic-ignored-optimization-argument,
,-cplusplus.InnerPointer,
,clang-analyzer-*,
,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
,-clang-analyzer-security.insecureAPI.strcpy,
,-clang-analyzer-cplusplus.InnerPointer,
,bugprone-*,
,-bugprone-easily-swappable-parameters,
,performance-*,
,-performance-no-int-to-ptr,
,readability-*,
,-readability-braces-around-statements,
,-readability-identifier-length,
,-readability-else-after-return,
,-readability-magic-numbers,
,-readability-function-cognitive-complexity,
,-readability-uppercase-literal-suffix,
,-readability-suspicious-call-argument,
,modernize-*,
,-modernize-use-auto,
,-modernize-avoid-c-arrays,
,-modernize-redundant-void-arg,
,-modernize-use-trailing-return-type,
'