3-696: Using Visual Studio, Team Foundation Server, Visual Studio Online, and SonarQube to Understand and Prevent Technical Debt

SonarQube is the de-facto Open Source tool for understanding and managing technical debt. In this session, presented by speakers from SonarSource and Microsoft, we show how SonarQube can be used in conjunction with the new code analysis features in Visual Studio 2015 and build in Team Foundation Server (TFS)/Visual Studio Online to provide technical debt in .Net and JavaScript code. After explaining what we mean by technical debt and why it's such a challenging problem for enterprises across the globe, we'll show how SonarQube is effective from the developer to the CTO at understanding, managing and analyzing debt top down, in particular being able to see how debt is trending over time, and the change in debt with respect to a baseline. Then we'll show how the new code analysis features in Visual Studio 2015 help prevent new debt from being introduced by analyzing code on the fly and providing the developer with advice and automated fixes.

1.0x

3-696: Using Visual Studio, Team Foundation Server, Visual Studio Online, and SonarQube to Understand and Prevent Technical Debt

Created 2 years ago

Duration 0:00:00
lesson view count 87
SonarQube is the de-facto Open Source tool for understanding and managing technical debt. In this session, presented by speakers from SonarSource and Microsoft, we show how SonarQube can be used in conjunction with the new code analysis features in Visual Studio 2015 and build in Team Foundation Server (TFS)/Visual Studio Online to provide technical debt in .Net and JavaScript code. After explaining what we mean by technical debt and why it's such a challenging problem for enterprises across the globe, we'll show how SonarQube is effective from the developer to the CTO at understanding, managing and analyzing debt top down, in particular being able to see how debt is trending over time, and the change in debt with respect to a baseline. Then we'll show how the new code analysis features in Visual Studio 2015 help prevent new debt from being introduced by analyzing code on the fly and providing the developer with advice and automated fixes.
Select the file type you wish to download
Slide Content
  1. Olivier Gaudin, CEO, SonarSource

    Slide 1 - Olivier Gaudin, CEO, SonarSource

    • Stuart Kent, Group Program Manager, Microsoft
    • Using Visual Studio, Team Foundation Server, Visual Studio Online, and SonarQube to Understand and Prevent Technical Debt
    • 3-696
    • //build/ content is being presented by Microsoft Office Mix The video for this session will be available shortly
  2. Olivier Gaudin, CEO, SonarSource

    Slide 2 - Olivier Gaudin, CEO, SonarSource

    • Stuart Kent, Group Program Manager, Microsoft
    • Using Visual Studio, Team Foundation Server, Visual Studio Online, and SonarQube to Understand and Prevent Technical Debt
    • 3-696
  3. Problem of Technical Debt

    Slide 3 - Problem of Technical Debt

    • SonarQube
    • Integration with TFS and .Net
    • What’s Next
    • Resources
    • Questions
    • Agenda
  4. Technical Debt

    Slide 4 - Technical Debt

  5. Duplications

    Slide 6 - Duplications

    • Bad distribution of complexity
    • Spaghetti Design
    • Lack of unit tests
    • No coding standards
    • Potential bugs
    • Not enough or too many comments
    • The deadly sins of the developer
  6. Too late

    Slide 7 - Too late

    • Pushback from teams
    • Lack of ownership
    • Heterogeneous requirements
    • Quality gate
    • This is hard!
  7. Development team owns quality

    Slide 8 - Development team owns quality

    • Shorter feedback loop
    • Unified quality gate
    • Cost is non-significant
    • This is fun!
    • Changing the Game
  8. 50K+ live instances

    Slide 10 - 50K+ live instances

    • 56% of Java developers use it daily*
    • 110K+ downloads per year
    • 20+ languages covered
    • 60+ plugins in the open source forge
    • In Numbers
    • *According to 2014 survey by RebelLabs
  9. SonarQube hasn’t worked well with .Net…

    Slide 13 - SonarQube hasn’t worked well with .Net…

    • Marcel de VriesMicrosoft MVP and CTO Xpirit
    • Both Microsoft and SonarSource have received similar messages from many customers
    • SonarQube Community
    • Very important is to support SonarQube tooling for .NET. SonarQube has become the defacto standard of providing code quality stats for your product and this is heavily used in the Java space. In enterprises this is also used for .NET projects, but the metrics don't match the VS tooling metrics.
    • You guys do not get it because you think Java. You definitely need to hire C# developers!
  10. Still

    Slide 14 - Still

    • overwhelming
    • overwhelming
    • Be actionable in controlling and remediating technical debt
    • Code Quality Data
    • Code Analysis Issues
    • Code Metrics, Clones, Coverage
    • Architectural insights
    • ALM insights
    • Application insights
    • Quality Profile
    • Filtered Code Quality Data
    • Define the quality lens
    • Choose rules and data relevant to your team
    • Remediation
    • Policy
    • Baseline
    • DefineRemediation policy
    • Don’t make it worse
    • Clean-up as you go
    • Issues to focus on
    • Define a baseline
    • - Last commit
    • - Specific version
    • Quality Gates
    • Define acceptablethresholds
  11. Slide 15

    • Prevent &Remediate
    • Understand
    • Control
    • ALM Workflow
    • Measure
    • IDE
    • Web based experience
    • TFS
    • VSO
    • VS
    • Build
    • Source Control
    • Work Items
    • / TFS
    • Technical Debt Dashboard
    • Technical Debt DataMart
  12. TFS/.Net Integration – Issues

    Slide 16 - TFS/.Net Integration – Issues

    • Fragile
    • Duplicates MSBuild configuration in manually edited files
    • Tries to externally replicate complex MSBuild processing
    • Not Integrated
    • No integration with build in TFS/VSO
    • Results from new Roslyn-based analysers not uploaded
    • SonarQube analysers don’t run in Visual Studio
    • Inconsistent
    • Metrics calculated in Visual Studio are different to the ones calculated by SonarQube
    • Fixed
    • todo
    • todo
  13. Demo – Integration of SonarQube with Microsoft ALM and .Net

    Slide 17 - Demo – Integration of SonarQube with Microsoft ALM and .Net

  14. TFS/.Net Integration – Approach

    Slide 18 - TFS/.Net Integration – Approach

    • SonarQube
    • Build Agent
    • File Store
    • Pre-Build
    • Fetch configuration from SonarQube server
    • MSBuild
    • Collect project info
    • Test
    • Post-Test
    • Detect code clones
    • Perform additional code analysis (e.g. Javascript)
    • Calculate metrics
    • Quality Profile
    • Quality Gates
    • Tech Debt Data
    • Code Coverage Data
    • Analysis Data
    • Solution & Project Data
  15. Prevent &Remediate

    Slide 20 - Prevent &Remediate

    • Understand
    • Control
    • What’s Next?
    • Measure
    • IDE
    • Web based experience
    • TFS
    • VSO
    • VS
    • Build
    • Source Control
    • Work Items
    • / TFS
    • Technical Debt Dashboard
    • Technical Debt DataMart
    • Tasks for new TFS/VSO build
    • Cloud build pre-configured with SonarQube analysis
    • Send data from new Roslyn-based code analysers
    • Sending data from Java builds
    • Integration of SQ runner for msbuild with other CI systems
    • Continuous update of .Net code analyzers
    • Baseline support in IDE
    • Align SonarQube metrics with those calculated in VS
  16. SonarQube post-test

    Slide 21 - SonarQube post-test

    • Send analysis data to SonarQube
    • Lan C.
    • Contoso / Contoso Web.
    • https://contoso-w3.visualstudio.com/DefaultCol
    • SonarQube pre-build
    • Prep build for SonarQube analysis
  17. Problem of Technical Debt

    Slide 22 - Problem of Technical Debt

    • SonarQube
    • Integration with TFS and .Net
    • What’s Next
    • Resources
    • Questions
    • Summary
  18. This is ready to use now

    Slide 23 - This is ready to use now

    • http://aka.ms/sonarqubeintegration has all the details
    • Resources
  19. © 2015 SonarSource SA. All rights reserved.

    Slide 24 - © 2015 SonarSource SA. All rights reserved.