We need to use a good `static code analyzer` to check common rule break. **SonarQube** - This one is quite good but it needs to be hosted in publicly accessible server