Commit Graph

41 Commits

Author SHA1 Message Date
Chris Thrasher
9f88867d90 Enable clang-tidy bugprone-misplaced-widening-cast check 2024-06-17 20:19:56 +00:00
Chris Thrasher
46a71e4fe8 Add clang-tidy readability-redundant-member-init check
This has to be silenced for `sf::Vertex` because in some places within
SFML we initialize only a subset of this aggregate type. If we remove
the `{}` from `texCoords` then we get a compiler warning from Clang. It
feels like these two clang-based tools are somewhat contradictory.

error: missing field 'texCoords' initializer [-Werror,-Wmissing-field-initializers]
            m_points.append({{x, y}, {r, g, b}});
2024-06-04 00:56:24 -06:00
Chris Thrasher
1d95c65526 Prohibit use of malloc 2024-04-27 21:46:06 +00:00
Chris Thrasher
249caa2fb2 Require that variables are initialized 2024-04-27 19:20:52 +00:00
Chris Thrasher
f5a9def56e Silence new clang-tidy-18 checks 2024-04-23 09:49:36 +02:00
Chris Thrasher
3d4815ef65 Enable bugprone-suspicious-include 2024-02-20 13:52:24 -07:00
Chris Thrasher
a7aa231274 Enable clang-tidy Objective-C checks 2024-01-14 19:20:02 -07:00
Chris Thrasher
3cf25d1c2e Add readability-containers-contains clang-tidy check 2023-12-12 09:10:51 -07:00
Chris Thrasher
133bcda6cb Add more readability-identifier-naming rules 2023-11-05 15:05:25 -07:00
Chris Thrasher
bb1a465e50 Add cppcoreguidelines-pro-type-member-init clang-tidy check
This marks another good step towards systematically rooting out
undefined behavior in the form of reading uninitialized memory.
2023-10-17 21:41:36 -05:00
Chris Thrasher
63eff96581 Add cppcoreguidelines clang-tidy checks
The following checks have been added:

    cppcoreguidelines-avoid-capturing-lambda-coroutines
    cppcoreguidelines-avoid-goto
    cppcoreguidelines-avoid-reference-coroutine-parameters
    cppcoreguidelines-c-copy-assignment-signature
    cppcoreguidelines-explicit-virtual-functions
    cppcoreguidelines-interfaces-global-init
    cppcoreguidelines-misleading-capture-default-by-value
    cppcoreguidelines-missing-std-forward
    cppcoreguidelines-noexcept-destructor
    cppcoreguidelines-noexcept-move-operations
    cppcoreguidelines-noexcept-swap
    cppcoreguidelines-pro-type-cstyle-cast
    cppcoreguidelines-slicing
    cppcoreguidelines-use-default-member-init
    cppcoreguidelines-virtual-class-destructor
2023-10-17 12:36:49 -05:00
Chris Thrasher
56784e198b Remove header include cycles 2023-09-29 15:55:39 -06:00
Chris Thrasher
10d8f5bf1e Silence new clang-tidy-17 checks 2023-09-29 15:55:39 -06:00
Chris Thrasher
9dc2e541e8 Add clang-tidy modernize-return-braced-init-list check 2023-09-17 15:47:33 -06:00
Chris Thrasher
fb1cfdc48d Add misc-const-correctness clang-tidy check 2023-05-04 16:22:03 -06:00
Chris Thrasher
97c00d42ad Enable clang-tidy modernize-pass-by-value check 2023-04-24 15:12:53 +02:00
Chris Thrasher
31c4b9472a Add clang-tidy bugprone-incorrect-roundings check 2023-04-16 10:47:47 -06:00
Chris Thrasher
82b9821a8a Add clang-tidy bugprone-* checks 2023-04-12 19:53:36 -06:00
Chris Thrasher
cafaa1c153 Add clang-tidy performance-* checks 2023-04-10 10:08:13 -06:00
Chris Thrasher
a100f847d5 Replace std::rand with <random> 2023-03-07 13:23:12 -07:00
Chris Thrasher
41aa062272 Add modernize-use-auto clang-tidy check 2023-02-15 09:42:50 -07:00
Chris Thrasher
0f2671a25c Add more clang-tidy checks 2023-01-25 14:53:33 -07:00
Norm Evangelista
9b1b0f5b07 Streamlined readability-* clang-tidy checks
Addressed CI complaints

Addressed review comments, CI issues

Reverted files exempted from linting

Fixed missing comma

Fixed clang-format escape

Disabled spurious readability-non-const-parameter

Addressed review comment

Moved NOLINT inside namespace per review

Remove const from function argument decls


Fixed rebase and formatting issues


Fixed macOS CI issues
2023-01-22 17:00:25 -07:00
Norm Evangelista
144b336c17 Added readability-redundant-*, readability-simplify-* checks
Fixed CI complaints


Restored comment for clarity
2023-01-20 08:31:25 -07:00
Norm Evangelista
6ef8e487cc Added readability-qualified-auto, -redundant-access-specifiers
Fixed clang-format escapes

Fixed OSX clang-tidy issues

Collapsed extraneous lines

Fixed clang-format escape
2023-01-19 15:53:40 -07:00
Chris Thrasher
88d40412d7 Enable all modernize- checks by default 2023-01-18 08:03:10 -07:00
Chris Thrasher
18e8d339e2 Add clang-tidy modernize-use-transparent-functors check 2023-01-18 08:03:10 -07:00
Chris Thrasher
a9bc4aa576 Add clang-tidy modernize-use-override check 2023-01-18 08:03:10 -07:00
Chris Thrasher
8a5b206bb8 Add clang-tidy modernize-use-default-member-init check 2023-01-18 08:03:10 -07:00
Chris Thrasher
d202f753ed Add clang-tidy modernize-deprecated-headers check 2023-01-18 08:03:10 -07:00
Chris Thrasher
8c3f07de80 Add clang-tidy modernize-loop-convert check 2023-01-18 08:03:10 -07:00
Chris Thrasher
8dc28909d3 Add clang-tidy portability checks 2023-01-16 15:16:46 -07:00
Norm Evangelista
3745ea2336 Added readability-container-size-empty, readability-isolate-declaration
FIxed Windows escapes for readability-* checks


Fixed Linux DRM readability-isolate-declaration escape


Fixed typo in fix :-|


Fixed clang-format issue
2023-01-16 21:45:33 +01:00
Norm Evangelista
a4bca20567 Added modernize-use-equals-default, modernize-use-equals-delete
Fixed formatting issues per review


Implemented copy constructor since operator= is implemented


Reverted operator=, add NOLINT for copy constructor per review


Fixed clang-tidy escape in examples


Fixed OSX clang-tidy escapes
2023-01-14 18:12:18 -07:00
Chris Thrasher
c5c6276291 Ensure clang-tidy uses color output 2023-01-14 15:13:02 -07:00
Norm Evangelista
39dd630f07 Added modernize-use-nullptr check
Addressed review comments


Fixed Vulkan.cpp clang-tidy issues


Used default-constructed objects instead of 0


More fun with OSX clang-tidy


Try casting a nullptr to see if clang-tidy can live with it


Revert "Try casting a nullptr to see if clang-tidy can live with it"

This reverts commit e217a1d8be45e3fd27dc73e1c7043be921d3830b.

Restored deleted line
2023-01-11 17:36:16 -07:00
Chris Thrasher
cdce9f7147 Use nested namespaces 2023-01-07 11:28:36 -07:00
Chris Thrasher
3b6db4d18c Enforce variable case 2022-12-12 16:10:03 -07:00
Chris Thrasher
cd985e37d2 Enforce parameter case 2022-10-24 12:53:29 +02:00
Chris Thrasher
33e82e1262 Start enforcing naming style 2022-10-23 17:32:13 +02:00
Chris Thrasher
80b45d4725 Add custom target for running clang-tidy 2022-10-17 18:29:56 -06:00