You need to prevent copy-paste compatibility with C like code, which is kind of possible with static analysers, but even then only over the source code you have access to, forbading any 3rd party libraries.
So unless you get the buy-in from the whole team, it hardly works across big projects.
So unless you get the buy-in from the whole team, it hardly works across big projects.