I want to introduce static analysis to our process. We mostly use SVN, so it seems a good idea to write pre-commit hook performing all the checks. The problem is, as static analysis tool works with an old code base, it catches a lot of false positives. It catches real issues too, but I still can't just disallow commit solely based on its output.

The compromise solution would of been showing the output as an error and letting the commit in anyways. It can be done with client side hooks, but I haven't found a way to do so on server side. AFAIK, hook can only write to stderr and return single integer value. And when the exit value is 0, error strings just don't show on the client.

So, is it possible to notify developer on the issues but still accept the commit with SVN?

有帮助吗?

解决方案

Yes, but with post-commit hook only

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top