 Bonjour, je suis Jean-Marc Prieur, programme-manager sur le Team Visual Studio. Dans cette vidéo, je vais vous montrer comment vous pouvez bénéficier de l'intégration du service Team Foundation et de services Team Visual Studio avec SonarCube pour manier votre dette technique. Je vais aussi vous montrer comment vous pouvez évoluer de nouvelles features dans le Studio Visual 2015 Update 1 pour poursuivre de nouvelles issues de statistiques de l'intégration et de réduire la dette, comme vous l'avez dit. Je vais commencer avec une réplique de l'intégration technique et pourquoi vous le soyez. Ensuite, je vais briefly présenter SonarCube. Je vais commencer par un démon sur comment vous pouvez rapidement ajouter un SonarCube de l'intégration continue de votre analyse et quel bénéfice vous pouvez obtenir de l'intégration dans votre team. Ensuite, je vais aussi vous montrer comment vous pouvez bénéficier de nouvelles expériences de base et de liste d'error dans le Studio Visual 2015 Update 1 pour poursuivre de l'intégration technique et poursuivre de l'intégration technique comme vous l'avez dit. Finalement, je vais partager avec vous quelques pointeurs des ressources qui vous aideront à vous placer plus loin. Alors, qu'est-ce que l'intégration technique? Et pourquoi vous soyez? L'intégration technique est un set de problèmes dans l'effort de développement qui rend le progrès pour le progrès de l'intégration technique inéficient. Ici, vous pouvez voir quelques symptômes et causes de l'intégration technique. L'intégration technique s'exprime de la productivité par la production d'un code difficile à comprendre, fragile, difficile à valider et qui crée un travail unplanned qui bloque le progrès. L'intégration technique est insidieuse. L'intégration technique s'exprime et crée en temps par des changements rouges, des contacts et des disciplines. L'organisation s'exprime souvent que plus que 50% de leur capacité est faible par l'intégration technique. Pour les développeurs, Visual Studio donne quelques outils pour identifier votre débat, principalement pour les codes managés. Par exemple, le code map m'a aidé à trouver l'architecture spaghetti. Le code métier s'exprime de la complexité de la salle de satellites, détaillent des conventions de programmation et des issues de sécurité. Mais si votre code n'est pas managé ou si vous voulez avoir un niveau levé et une définition publique de la qualité de votre organisation vous devriez avoir uneelle à SonarQube. SonarQube est une solution壮vante. Elle soutient la code analysable avec des langages語ants, des méteres computées en disant des indicateurs de qualité dans un portail. J'ai ajouté une copie de screen de neymo.sonarcube.org, qui est un site où vous pouvez regarder la qualité des projets d'open source. Microsoft a participé avec SonarSource, la compagnie produisant SonarCube, pour donner l'intégration entre SonarCube et MSBuild, le serveur de team foundation, via STS. Vous pouvez donc bénéficier dans le best of both worlds. Dans mon premier demo, je vais montrer comment to set up a continuous integration build in Visual Studio team services and perform analysis of code on build and send result of analysis and test to a SonarCube server hosted in a VM in Azure. But that could be on premise. Let's start by looking at the app I'm going to analyze in Visual Studio. So here we are in the Visual Studio solution and as you can see there are lots of warnings which is one of the indicators of technical debt. The first step is to understand our technical debt, measure it and understand the trends in order to be able to manage it. So for this solution, I had set up a continuous integration build and here we are in Visual Studio team services but that would also be the case in TFS. I've also set up a SonarCube installation. It's in a virtual machine in Azure here that could be on premise. I've modified the build definition to add SonarCube analysis by adding these two tasks. This is very simple. The first task needs to be done before MS build. The second task, the end analysis, should be done after running MS test. The initial task is configured to point to the SonarCube URL and credentials. So that's the end point. But I also gave the project key, the SonarCube project key, which is a unique identifier, a name for this SonarCube project and a version. I have already done a build so we can have a look at the build results. And you see that if you know team build already, there is a new section, SonarCube analysis reports. And when you click on the link, you get directly to the SonarCube project itself where you can have some information about how many issues you have and their severities and estimation of the time it would take to remove them, remediate the debts and all kinds of interesting metrics about your code base including complexity and duplications. You have a summary of a rating and the percentage of debt in your application. Even better, you can do a deep with respect to a base line and you can see how your technical debt evolved. Here we see that this code has made progress. So in this demo, you've seen how you can quickly modify your continuous integration build to support SonarCube analysis and measure your technical debt. By the way, that also works for Java if you use the Maven task in TimBuild. Back to our solution in Visual Studio, let's control the debt. Let's be back in our Visual Studio solution. We know that we have a lot of issues and indeed that would be the case for almost any existing code. Have you noticed that when you start a new project, you tend to pay more attention to the warnings and even try not to have any but for existing solution that is not possible. As I type, the Roving Analyzers will tell me that I have new issues but they will be hidden in the middle of the existing issues. Therefore, let's acknowledge that we have technical debt and let's take a fresh start. For that, let me use a new command in Visual Studio which is analyze, run, code analysis and suppress active issues. So I'm going to run this command which I could have run only on one project using the analyze menu or even also from the analyze top level menu where you have exactly the same kind of command for the both level, the solution and the project. What you see is that a build has started. Now the build has finished and something that has happened to remove all the issues actually to take a baseline and you see that some new files have appeared the global suppression files and they contain suppression messages and especially, they are very special because the justification is pending that's telling you that we have taken a baseline. And now, when I will write code and let's do it here let's do something simple I will just mimic as if I had written code I will see the warnings appearing and I can clean them up immediately. So in that case, let's assume I've written some code and I've left a sign but not choose variable I can immediately clean it because it's no longer polluted by all kind of warnings. So I understand that I can keep the code clean I can not increase the technical debt but we can do better to clean up the code as we go. For this, we have introduced a new filter in our list named changed document and what that means is if I apply this filter change document and use and you see this new column suppressed that shows me all the suppression if I now show the suppression what I will see is all the errors and technical debt issues which I have the opportunity of fixing as I'm developing, as I'm changing this code for example to fix a bug or to develop a new feature and if you have fixers, you can apply them otherwise you just do what is advised by these warnings by the Rosling analyzers and quickly you get your debt down to meet the changes I think the continuous integration will happen and when the build is completed I will be able to see in SonarCube that the technical debt has decreased so we've seen how in the ID you can stop new static analysis issues from appearing and start making a dent in the technical debt with SonarCube, you get the big picture and you can control the definition of the quality that is the bar of your organization So that's it for the demos I hope you found them useful To conclude, here are some resources you can follow to find more information Thanks for watching and have a nice day