Open Bug 1553495 Opened 3 years ago Updated 1 month ago

[clang-tidy] Investigate the possibility of enabling: readability-magic-numbers


(Developer Infrastructure :: Source Code Analysis, task)

Not set


(Not tracked)


(Reporter: andi, Unassigned)



Since in Bug 1551842 we've added new checkers from clang-tidy 8.0 we've also seen this new checkers readability-magic-numbers that in the above mentioned bug has been added but it's disabled since we must see first it's impact on our code and later on, if it confirms it's feasibility, we should enable it.
A good start would be to have a rough estimation on how many issues it finds on Gecko.

Component: Lint and Formatting → Source Code Analysis

it founds 18461 defects on the tree (includes thirdparties)
but there are some dumb false positives which should be reported upstream.

For example, the position in the array is reported:

But it finds other things which would be useful for readability

Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.