Yes, but with post-commit hook only
SVN hook. How to show an error and accept the commit too?
-
04-06-2022 - |
Question
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?
Solution