Skip to content

Conversation

@zfergus
Copy link
Member

@zfergus zfergus commented Oct 3, 2025

Description

Static Analysis and Code Style Improvements:

  • Added a .clang-tidy configuration file with a comprehensive set of checks, exclusions, naming conventions, and options to enforce modern C++ practices and treat all warnings as errors.
  • Introduced a GitHub Actions workflow (.github/workflows/clang-tidy-check.yml) to automatically run Clang-Tidy on relevant files for every push and pull request, improving code quality and review automation.

Refactoring for Clarity and Safety:

  • Standardized empty container checks from size() == 0 to empty() throughout broad phase modules, improving readability and safety.

Variable and Member Initialization:

  • Renamed one_div_voxelSize to one_div_voxel_size and updated all usages for clarity and consistency.
  • Initialized class members such as vertex_ids in AABB and m_cell_size in HashGrid to safe default values to prevent uninitialized usage.

Minor Code Modernization:

  • Removed unnecessary inline keywords from class member functions, and improved parameter naming for clarity and documentation.

- Removed unnecessary inline specifiers for member functions in spatial_hash.hpp.
- Initialized member variables in spatial_hash.hpp to default values.
- Updated assertions to check for emptiness instead of size in various locations.
- Changed shared pointer parameters to use const references for efficiency.
- Simplified conditional checks and improved readability in multiple files.
- Replaced manual checks for negative values with std::max in collision_mesh.cpp.
- Enhanced clarity in comments and function signatures across several files.
- Updated distance type enums to use uint8_t for better memory efficiency.
- Improved consistency in function parameter naming and usage.
- Cleaned up unused parameters and improved function documentation.
@zfergus zfergus requested a review from Copilot October 3, 2025 07:21

This comment was marked as resolved.

@codecov
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 94.44444% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.98%. Comparing base (764f6d0) to head (b98a254).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ipc/broad_phase/broad_phase.hpp 0.00% 2 Missing ⚠️
src/ipc/collision_mesh.hpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
- Coverage   96.03%   95.98%   -0.05%     
==========================================
  Files         105      104       -1     
  Lines        8100     8077      -23     
==========================================
- Hits         7779     7753      -26     
- Misses        321      324       +3     
Flag Coverage Δ
unittests 95.98% <94.44%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zfergus zfergus merged commit fc15b8e into main Oct 3, 2025
18 checks passed
@zfergus zfergus deleted the clang-tidy branch October 3, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants