Finds function definitions where parameters of convertible types follow each other directly, making call sites prone to calling the function with swapped (or badly ordered) arguments.
Such constructs are usually the result of insufficient design and lack the exploitation of strong type capabilities that are possible in the language.
This check finds and flags function definitions, and not call sites. The reasoning is that while there are several ways to heuristically detect a potential swapped call, in the long term, ensuring a safe interface is more beneficial.
As an interface rule, it is understandable that it goes nuts over large projects that have yet to make their interfaces stricter and stronger.
Some of the most trivial flagged examples might be:
FILE *open(std::string_view Directory, std::string_view Filename, std::string_view Extension) { /* ... */ }
Originally, the check was meant to implement C++ Core Guideline rule I.24 "Avoid adjacent parameters of the same type when changing the argument order would change meaning" here, however, discussion about the rule's applicability is ongoing. For now, introducing the check outside the cppcoreguidelines- namespace so that people can still benefit from it.
Do these data members need to be public?