Compiler dont do static analysis as they do only syntax and semantic check but many rules that are good programming practices will not be caught by compiler but a static analysis tool will catch all of them depending on the rules set in the co configuration.