-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add check for mathematical constants (no macros) #3774
base: main
Are you sure you want to change the base?
Conversation
7d18110
to
926babc
Compare
926babc
to
e8e4b36
Compare
Quality Gate passedIssues Measures |
Hi @AJPfleger Is this test simply complaining or is it also trying to replace the code? In the latter case I have some concern since you may have to decide between (e.g.) |
It has a way to fix misused macros. As everything in ACTS, no changes are made without a proper PR. Since we don't have any cases of the macros anymore, they could only be introduced over new PRs. The author could attempt a quick fix using So, I don't really see a worsening of the situation. |
The firstly intended clang tidy check
modernize-use-std-numbers
is not suited for us:M_PI
benefit would have been to detect cases like
static_cast<float>(std::numbers::pi)
instead ofstd::numbers::pi_v<float>
or usages ofstd::sqrt(2.)
instead ofstd::numbers::sqrt2
.The updated test now checks for the classical
M_*
macros that could be accidentally used.blocked:
std::numbers
#3781