Can any one recommend a tool that will allow me to define a set of coding style requirements, and prevent anything that violates this style from being committed into the main HG repository.
I know that I can use hooks to prevent something getting into the repo. But I am not aware of any tools that can perform this sort of style analysis.
Things like my
$newArrayRef = $result; would be allowed but
$newArrayRef= $result; would not. And defining if a project uses camel case or underscores for variable names.
It would be nice if it could also check for anti-patterns in the code.