Everybody uses intellij. We couldn't find ability to add local precommit hooks there and we didn't have resources to build our own custom tool for such basic operation.
You are using perforce so just write a bash script called p4 that if you are doing a commit first does checks followed by the real commit and otherwise passed every command to the real p4.
http://benjamin-meyer.blogspot.com/2010/06/managing-project-...