I would imagine most codebases, even in modern languages, tend to have a list of banned features. Typically you use a linter to catch these.