Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add clang-tidy check for C-style casts (acts-project#3149)
Adds a new clang-tidy check. Necessary changes and more details in the PR below. blocked by: - acts-project#3146 ## Sample ``` ╭─ /builds/acts/ci-bridge/src/Tests/UnitTests/Core/Vertexing/SingleSeedVertexF─╮ │ 🟡 │ │ /builds/acts/ci-bridge/src/Tests/UnitTests/Core/Vertexing/SingleSeedVertexFi │ │ nderTests.cpp:47:10 WARNING [google-readability-casting] │ │ ╭──────────────────────────────────────────────────────────────────────────╮ │ │ │ C-style casts are discouraged; use static_cast │ │ │ │ 47 | return (int)(gen() / 4294967296. * (to - from) + from); │ │ │ │ | ^~~~~ │ │ │ │ | static_cast<int> │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ ──────────────────────────────────────────────────────────────────────────── │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─ /builds/acts/ci-bridge/src/Tests/UnitTests/Core/Material/MaterialCompositio─╮ │ 🟡 │ │ /builds/acts/ci-bridge/src/Tests/UnitTests/Core/Material/MaterialComposition │ │ Tests.cpp:28:26 WARNING [google-readability-casting] │ │ ╭──────────────────────────────────────────────────────────────────────────╮ │ │ │ C-style casts are discouraged; use static_cast │ │ │ │ 28 | float carbonFraction = float(carbonWeight) / 255u; │ │ │ │ | ^~~~~ │ │ │ │ | static_cast<float> │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ ──────────────────────────────────────────────────────────────────────────── │ ╰──────────────────────────────────────────────────────────────────────────────╯ ```
- Loading branch information