I can't find any suitable SW to perform this task.
I am not referring to any specific language, but I'm more skilled in VBA than others, so maybe a VBA macro would fit better my needs.

I'd like to be able to perform an automatic check of if-then-else structure consistency (missing closures, double else, or whatelse).
I tried writing a macro, but I keep finding "special cases" it does not manage... But I can't believe no programmers in last 50 years developed such a tool!
I am not talking about a full package for code quality check; just an if-then-else checker.
Does it exist?
Maybe I am just looking fow wrong search keywords.