Domanda

I use Sonar through the sonar runner client. Actually, I call it from NAnt build system, and the NAnt exec call should fail in case the exit code is not 0.

However, I've recently faced with an issue that sonar runner always returns 0 exit code, even if one of the plugins (e.g. NDeps) throws exception. As far as I can see, the analysis data is not committed to the database in this case, hence it is a good reason to fail.

I seem to remember that one of the previous versions of Sonar / Sonar runner used to behave the way I expected - in case a plugin fails, the exit code was not 0.

Today I use Sonar 3.2 / Sonar runner 2.0 / C# Ecosystem 1.4, which is all the latest as far as I can see.

Is there a configuration flag somewhere to return proper exit codes? Any other workaround to this issue?

È stato utile?

Soluzione

For information: discussion happened on this topic is currently happening on Sonar User mailing-list. It can be followed here: http://sonar.15.n6.nabble.com/Sonar-runner-exit-code-is-always-0-tt5003433.html

EDIT: after investigation with Yan, it turns out that the Sonar BAT script behaves differently depending on the vesion of Windows that is used. Yan has suggested a way to fix this, and a ticket has been opened for next version of the Sonar Runner.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top