In some cases it is not easy to translate a not tail recursive function into its tail recursive implementation.
Theoretically it is always possible but sometimes the tail recursive version will be much uglier and longer and even less efficient.
Besides that it is not always a problem to have not tail recursive functions if we know the recursion is not infinite.
It would be good to implement something in the erlang plugin which works similarly. People should be able to indicate that the given function/check implemented by the plugin should be suppressed. Something similar like ignore warnings option for dialyzer.
hey, I do not maintain the project anymore, you can either create a MR or I would suggest create an issue at: https://github.com/evolution-gaming/sonar-erlang where you can find a more recent version of the plugin.
In some cases it is not easy to translate a not tail recursive function into its tail recursive implementation. Theoretically it is always possible but sometimes the tail recursive version will be much uglier and longer and even less efficient. Besides that it is not always a problem to have not tail recursive functions if we know the recursion is not infinite.
For java code it is possible to indicate it in the source code that the given function should not be validated by sonar checks. https://stackoverflow.com/questions/24058137/sonarqube-suppress-warnings-on-function-level
It would be good to implement something in the erlang plugin which works similarly. People should be able to indicate that the given function/check implemented by the plugin should be suppressed. Something similar like ignore warnings option for dialyzer.
For instance: