Вопрос

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