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.

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:58:29
lesson view count 1133
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.
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
  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. Technical Debt

    Slide 5 - Technical Debt

  6. Technical Debt

    Slide 6 - Technical Debt

  7. Duplications

    Slide 8 - 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
  8. Too late

    Slide 9 - Too late

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

    Slide 10 - Development team owns quality

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

    Slide 13 - 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
  11. SonarQube hasn’t worked well with .Net…

    Slide 17 - 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!
  12. Still

    Slide 18 - 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
  13. Slide 19

    • 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
  14. TFS/.Net Integration – Issues

    Slide 20 - 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
  15. Demo – Integration of SonarQube with Microsoft ALM and .Net

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

  16. Demo – Integration of SonarQube with Microsoft ALM and .Net

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

  17. TFS/.Net Integration – Approach

    Slide 23 - 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
  18. Prevent &Remediate

    Slide 25 - 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
  19. SonarQube post-test

    Slide 26 - 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
  20. Problem of Technical Debt

    Slide 27 - Problem of Technical Debt

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

    Slide 28 - This is ready to use now

    • http://aka.ms/sonarqubeintegration has all the details
    • Resources
  22. This is ready to use now

    Slide 29 - This is ready to use now

    • http://aka.ms/sonarqubeintegration has all the details
    • Resources