I have a problem. I want to judge that a certain piece of code cannot be submitted to SVN according to the results of sonarlint analysis, which means that the programmer does not want to modify his own code, but there are serious errors in the code.Is there any method that can be called by sonarlint for analysis by other tools
Am I correct in my understanding by saying you are trying to setup a pre commit hook?
In the past we provided a SonarLint command line interface, but we decided to stop supporting it. You can maybe still have a look at it, but there are many reasons why we think this is not a good approach.
For example, some issues are debatable, and preventing the developer to commit (or breaking the build) is not what we consider as the right thing to do. Why not instead use feature branches, and trigger analysis of those branches, so that developers have a chance to manage new issues in SonarQube UI, before merging the feature branch in trunk?
Thank you for your reply.
Now we have a functional branch, but the supervisor still wants to control the programmer’s submission of the code.I have another question. The example you gave me means that it can’t be used in the future.
My English is not very good, thanks again
As I said, having pre commit hooks, or any other kind of technical breaking of the development pipeline is not in our mindset.
If you already have a functional branch, then it is possible to use our commercial branch analysis feature to analyze it, and it could be part of the process to have a good enough quality before merging.