Quite apart from not being possible forbidding non-auto declarations also sounds like a terrible idea. I am not really that fond of the auto keyword. In some cases it is necessary and/or helpful but it is also very helpful to be able to tell what the type of a variable is at a glance. I think the auto keyword should be used sparingly.
There is tooling along those lines. I wouldn't expect to find a tool that forbids non-auto declarations, but there are certainly some that suggest when something could've been auto.
Right. clang-tidy lets you specify rules you’d like it to enforce in the code you pass through it. It’s not a part of the compilation process, but uses the same underlying driver (if you’re building with clang)
On large projects it can be integrated into the build pipeline, so in a sense it becomes part of the product compilation process, even if not on the local workstation.
I am a big friend to push good coding practices into the CI/CD configuration, regardless of the programming language.
Anyone can do whatever they feel like on their own computer, but the overall product has guidelines to follow, specially relevant in projects that live from changing consulting companies all the time.