Charles Kerr
7c11809672
fix: more clang-tidy warnings ( #6608 )
...
* fix: readability-redundant-casting warnings in gtk
* fix: bugprone-move-forwarding-reference warnings in gtk
* fix: readability-redundant-casting warnings in qt
* fix: bugprone-switch-missing-default-case warnings in qt
* fix: readability-use-std-min-max warning in qt client
* fix: readability-static-accessed-through-instance warning in qt client
* fix: cppcoreguidelines-avoid-const-or-ref-data-members warning in qt client
* fix: readability-avoid-nested-conditional-operator warning in qt client
* fixup! fix: readability-use-std-min-max warning in qt client
* fix: readability-redundant-member-init warnings in gtk client
* fix: performance-avoid-endl warnings in gtk client
* chore: disable readability-qualified-auto
too many false warnings
* chore: disable cppcoreguidelines-avoid-const-or-ref-data-members
* chore: fix readability-duplicate-include warning in gtk client
* chore: fix modernize-use-nodiscard warning in gtk client
* chore: fix readability-convert-member-functions-to-static warning in gtk client
* fixup! fix: bugprone-move-forwarding-reference warnings in gtk
* chore: fix performance-enum-size warning in gtk client
* fix: cppcoreguidelines-prefer-member-initializer warning in gtk client
* fix: readability-identifier-naming warning in qt client
* Revert "chore: fix performance-enum-size warning in gtk client"
This reverts commit 5ce6b562f8
.
* fix: readability-redundant-member-init warning in move tests
* fix: readability-redundant-casting warnings in tests
* fixup! fix: readability-identifier-naming warning in qt client
* fixup! fix: readability-avoid-nested-conditional-operator warning in qt client
* fix: readability-static-accessed-through-instance warning in qt client
* fix: readability-redundant-casting warning in watchdir tests
2024-02-17 13:31:49 -06:00
Charles Kerr
468de87076
refactor: fix cppcoreguidelines-avoid-do-while warnings ( #6527 )
...
* fix: avoid do-while in tr_sys_file_lock()
* fix: avoid do-while in BitfieldTest
* chore: set cppcoreguidelines-avoid-do-while.IgnoreMacros
* fix: avoid do-while in FileList::Impl::onRowActivated()
* fix: avoid do-while in tr_spawn_async_in_parent()
* fix: avoid do-while in handle_sigchld()
* fixup! fix: avoid do-while in tr_spawn_async_in_parent()
* fixup! fix: avoid do-while in FileList::Impl::onRowActivated()
* fixup! fix: avoid do-while in tr_spawn_async_in_parent()
fix fd leak regression
* fixup! fix: avoid do-while in tr_spawn_async_in_parent()
2024-01-20 16:56:42 -06:00
Charles Kerr
9d433ff8b4
fix: misc-include-cleaner clang-tidy warnings ( #6502 )
2024-01-07 14:21:05 -06:00
Mike Gelfand
fbb98ada4a
Fix issues reported by hicpp
clang-tidy checks (GTK client) ( #4711 )
...
* Fix `hicpp-vararg` clang-tidy issues
* Fix `hicpp-explicit-conversions` clang-tidy issues
* Fix `hicpp-signed-bitwise` clang-tidy issues
* Enable the rest of `hicpp` clang-tidy checks
2023-02-03 16:12:48 +00:00
Mike Gelfand
bd72b8c3fc
Fix clang-tidy issues stemming from header files (GTK client) ( #4623 )
...
* Fix `readability-avoid-const-params-in-decls` clang-tidy issues
* Fix `bugprone-macro-parentheses` clang-tidy issues
* Fix `modernize-use-using` clang-tidy issues
* Fix `readability-named-parameter` clang-tidy issues
* Fix `cppcoreguidelines-owning-memory` clang-tidy issues
* Fix `cppcoreguidelines-special-member-functions` clang-tidy issues
* Fix `cppcoreguidelines-macro-usage` clang-tidy issues
* Fix `modernize-use-nodiscard` clang-tidy issues
* Fix `cppcoreguidelines-macro-usage` clang-tidy issues
* Add headers filter for /gtk/ subdirectory
2023-01-21 12:06:20 +00:00
Mike Gelfand
ac6010557e
Fix issues reported by clang-tidy bugprone
checks (GTK client) ( #4183 )
...
* Fix `bugprone-unchecked-optional-access` clang-tidy issues
* Fix `bugprone-easily-swappable-parameters` clang-tidy issues
* Extend clang-tidy configuration
2022-11-15 19:30:32 +00:00
Mike Gelfand
2bd6c8aff4
Fix issues reported by clang-tidy cert
checks (GTK client) ( #4174 )
...
* Fix `cert-err33-c` clang-tidy issues
* Fix `cert-str34-c` clang-tidy issues
* Fold free-standing functions into `FilterBar::Impl`
This is in preparation to next commit fixing `cert-err58-cpp`.
* Fix `cert-err58-cpp` clang-tidy issues
* Extend clang-tidy configuration
2022-11-15 00:53:12 +00:00
Mike Gelfand
f8d981349e
Fix issues reported by clang-tidy misc
checks (GTK client) ( #4167 )
...
* Fix `misc-const-correctness` clang-tidy issues
* Fix `misc-no-recursion` clang-tidy issues
* Extend clang-tidy configuration
2022-11-14 16:22:38 +00:00
Mike Gelfand
fd9c454c45
Fix issues reported by clang-tidy performance
checks (GTK client) ( #4160 )
...
* Fix `performance-move-const-arg` clang-tidy issues
* Fix `performance-no-automatic-move` clang-tidy issues
* Extend clang-tidy configuration
2022-11-13 20:50:07 +00:00
Mike Gelfand
49ce12ce38
Fix issues reported by clang-tidy cppcoreguidelines
checks (GTK client) ( #4158 )
...
* Fix `cppcoreguidelines-pro-type-cstyle-cast` clang-tidy issues
* Fix `cppcoreguidelines-pro-type-member-init` clang-tidy issues
* Fix `cppcoreguidelines-prefer-member-initializer` clang-tidy issues
* Introduce `PageBase` for `PrefsDialog` pages
This is in preparation for next PR fixing `Glib::Timer` memory
management.
* Fix `cppcoreguidelines-owning-memory` clang-tidy issues
* Fix `cppcoreguidelines-pro-bounds-array-to-pointer-decay` clang-tidy issues
* Fix `cppcoreguidelines-special-member-functions` clang-tidy issues
* Fix `cppcoreguidelines-init-variables` clang-tidy issues
* Fix `cppcoreguidelines-macro-usage` clang-tidy issues
* Fix `cppcoreguidelines-pro-bounds-constant-array-index` clang-tidy issues
* Fix `cppcoreguidelines-non-private-member-variables-in-classes` clang-tidy issues
* Fix `cppcoreguidelines-pro-type-vararg` clang-tidy issues
* Fix `cppcoreguidelines-pro-bounds-pointer-arithmetic` clang-tidy issue
* Fix `cppcoreguidelines-pro-type-reinterpret-cast` clang-tidy issues
* Fix `cppcoreguidelines-pro-type-static-cast-downcast` clang-tidy issues
* Extend clang-tidy configuration
Enable all `cppcoreguidelines` checks except for three (`avoid-magic-
numbers`, `avoid-non-const-global-variables`, `narrowing-conversions`)
which require [more] extensive refactoring and were left for later.
2022-11-13 17:36:16 +00:00
Mike Gelfand
92b74fee74
Fix issues reported by clang-tidy modernize
checks (GTK client) ( #4137 )
...
* Fix `modernize-avoid-c-arrays` clang-tidy issues
* Fix `modernize-raw-string-literal` clang-tidy issues
* Fix `modernize-use-nodiscard` clang-tidy issues
* Fix `modernize-deprecated-headers` clang-tidy issues
* Fix `modernize-pass-by-value` clang-tidy issues
* Extend clang-tidy configuration
Enable all `modernize` checks except for one (use-trailing-return-type)
which is an extensive stylistic change for later.
2022-11-10 20:35:31 +01:00
Mike Gelfand
eec93de5ca
Fix issues reported by clang-tidy readability
checks (GTK client) ( #4127 )
...
* Fix `readability-container-data-pointer` clang-tidy issues
* Fix `readability-container-size-empty` clang-tidy issues
* Fix `readability-isolate-declaration` clang-tidy issues
* Fix `readability-convert-member-functions-to-static` clang-tidy issues
* Fix `readability-else-after-return` clang-tidy issues
* Fix `readability-redundant-member-init` clang-tidy issues
* Fix `readability-uppercase-literal-suffix` clang-tidy issues
* Fix `readability-make-member-function-const` clang-tidy issues
* Fix `readability-simplify-boolean-expr` clang-tidy issues
* Fix `readability-qualified-auto` clang-tidy issues
* Fix `readability-avoid-const-params-in-decls` clang-tidy issues
* Fix `readability-implicit-bool-conversion` clang-tidy issues
* Fix `readability-inconsistent-declaration-parameter-name` clang-tidy issues
* Add initial .clang-tidy configuration
Currently enabling readability checks only, others to follow. Of the
four disabled readability checks, three (function-cognitive-complexity,
identifier-length, magic-numbers) require extensive refactoring and were
left for later, and one (redundant-access-specifiers) is not planned to
be fixed due to the current coding style - using extra sections to
separate methods from variables of the same visibility.
2022-11-09 16:58:36 +00:00