{"id":12255,"date":"2017-05-22T10:01:06","date_gmt":"2017-05-22T17:01:06","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/?p=12255"},"modified":"2019-02-14T15:27:11","modified_gmt":"2019-02-14T23:27:11","slug":"committing-with-confidence-getting-code-quality-information-at-commit-time","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/committing-with-confidence-getting-code-quality-information-at-commit-time\/","title":{"rendered":"Committing with Confidence: Getting Code Quality Information at Commit Time"},"content":{"rendered":"<p>Many developers tell us that they are under pressure to deliver software on an ever-faster cadence. This pressure for increased speed makes building your software at high quality from the start even more important \u2013 you want to make sure that any commits you make to your codebase are at the right quality, to avoid costly remediation of errors later. Getting key information about your code\u2019s quality at key moments such as commits and pull requests can help you meet quality goals without distracting you from creating the features your customers demand. We\u2019re now providing that information at commit time in the latest release of the <a target=\"_blank\" href=\"http:\/\/aka.ms\/CD4VS\" rel=\"noopener noreferrer\">Continuous Delivery Tools for Visual Studio<\/a> extension.<\/p>\n<h2>Get a heads-up on Build and Code Analysis Results on Commit<\/h2>\n<p>With the new Build and Code Analysis Results panel, you\u2019ll get a heads-up reminder at commit-time of issues detected by any code analysis tool that puts results in the error list. This means you can take care of those issues before they propagate into your team\u2019s continuous integration and delivery process, and commit your code with confidence.<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CDT-Mark-Build-and-Code-Analysis-Results-panel.png\" rel=\"noopener noreferrer\"><img decoding=\"async\" title=\"Build and Code Analysis Results panel\" alt=\"Build and Code Analysis Results panel\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CDT-Mark-Build-and-Code-Analysis-Results-panel.png\" width=\"350\" height=\"337\" class=\"\" \/><\/a><\/p>\n<p>Just click the View Issues link in the new panel, and you\u2019ll be taken straight to the Error List tool window showing the problems you\u2019ve configured to show up there, and may want to take a look at:<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CDT-Mark-Error-List.png\" rel=\"noopener noreferrer\"><img decoding=\"async\" title=\"Error List\" alt=\"Error List\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CDT-Mark-Error-List.png\" width=\"1024\" height=\"201\" \/><\/a><\/p>\n<p>You\u2019ll see results both for live edit-time analysis (e.g. C#\/VB Analyzers) and, via the Refresh Analysis link, for compile-time static analysis (e.g. C++ Static Analysis tools). Many C#\/VB Analyzers also provide Lightbulb fix suggestions to make the job of remediation easier.<\/p>\n<h2>See issues from multiple analysis sources<\/h2>\n<p>The Build and Code Analysis Results panel uses the issues posted to the error list, which means that your heads-up can include data from multiple sources. For instance, if you are a <a target=\"_blank\" href=\"https:\/\/www.sonarsource.com\/why-us\/products\/sonarqube\/\" rel=\"noopener noreferrer\">SonarQube<\/a> user, you can easily set up <a target=\"_blank\" href=\"http:\/\/www.sonarlint.org\/visualstudio\/index.html\" rel=\"noopener noreferrer\">SonarLint<\/a> (see more details in <a target=\"_blank\" href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/05\/11\/sonarlint-2-2-for-visual-studio-improves-the-connected-mode\/\" rel=\"noopener noreferrer\">Jean-Marc Prieur\u2019s article<\/a>) and see results in the error list, gaining the benefit of the new heads-up panel as well, as shown in the screenshot above.<\/p>\n<p>Other providers of analysis tools are already working on providing error list support for their results. For instance I recently demonstrated a prototype of <a target=\"_blank\" href=\"http:\/\/www.ndepend.com\/\" rel=\"noopener noreferrer\">NDepend<\/a> at Build 2017 (<a target=\"_blank\" href=\"https:\/\/channel9.msdn.com\/events\/Build\/2017\/B8019#time=20m35s\" rel=\"noopener noreferrer\">See video<\/a> ), see the screenshot below:<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CDT-Mark-See-issues-from-multiple-analysis-sources.png\" rel=\"noopener noreferrer\"><img decoding=\"async\" title=\"See issues from multiple analysis sources\" alt=\"See issues from multiple analysis sources\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CDT-Mark-See-issues-from-multiple-analysis-sources.png\" width=\"1024\" height=\"216\" \/><\/a><\/p>\n<p>If you want to narrow your focus to just the files that are included in your commit, you can easily achieve this by selecting the Changed Documents option from the Error List drop down which shows up when your code is under source code control:<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CDT-Mark-Changed-Documents-option-from-the-Error-List-drop-down-e1495472068954.png\" rel=\"noopener noreferrer\"><img decoding=\"async\" title=\"Changed Documents option from the Error List drop down\" alt=\"Changed Documents option from the Error List drop down\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/CDT-Mark-Changed-Documents-option-from-the-Error-List-drop-down-e1495472068954.png\" width=\"156\" height=\"130\" class=\"\" \/><\/a><\/p>\n<p>For instance, this can be useful if your team has a policy of \u201cfix it if you touch the file\u201d.\u00a0The panel is supported on Visual Studio 2017 Enterprise. It currently supports C#, VB and C++ projects, where the code is being committed to a Git Repo.<\/p>\n<h2>Please Share Your Feedback<\/h2>\n<p>Please download and try the <a target=\"_blank\" href=\"http:\/\/aka.ms\/CD4VS\" rel=\"noopener noreferrer\">Continuous Delivery Tools for Visual Studio DevLabs extension<\/a>, try out the new Build and Code Analysis Results panel and let us know what you think.<\/p>\n<p>Tell us more about what you think about this by filling out a short <a target=\"_blank\" href=\"https:\/\/aka.ms\/vs2017cqcigeneral\" rel=\"noopener noreferrer\">survey<\/a><\/p>\n<p>We\u2019re always looking for feedback on where to take this <a target=\"_blank\" href=\"https:\/\/blogs.msdn.microsoft.com\/somasegar\/2013\/02\/19\/the-evolution-of-devlabs\/\" rel=\"noopener noreferrer\">Microsoft DevLabs extension<\/a> next; features from the extension have already been refined using that feedback and incorporated into the core Visual Studio product in updates. There\u2019s a <a target=\"_blank\" href=\"https:\/\/channel9.msdn.com\/events\/Build\/2017\/B8019#time=20m35s\" rel=\"noopener noreferrer\">Slack channel<\/a> and a team alias <a>vsdevops@microsoft.com<\/a> where you can reach out to the team and others in the community sharing ideas on this topic.<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"650\" border=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"150\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Mark-Wilson-Thomas.jpg\" width=\"162\" height=\"168\" \/><\/td>\n<td valign=\"top\" width=\"450\"><strong>Mark Wilson-Thomas<\/strong>, Senior Program Manager, Visual Studio IDE Team\n<a target=\"_blank\" href=\"https:\/\/twitter.com\/markpavwt\" rel=\"noopener noreferrer\">@MarkPavWT<\/a><\/p>\n<p>Mark is a Program Manager on the Visual Studio IDE team, where he&#8217;s been building developer tools for nearly 10 years. He currently looks after the Visual Studio Editor. Prior to that, he worked on tools for Office, SQL, WPF and Silverlight.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Many developers tell us that they are under pressure to deliver software on an ever-faster cadence. This pressure for increased speed makes building your software at high quality from the start even more important \u2013 you want to make sure that any commits you make to your codebase are at the right quality, to avoid [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[472,155],"tags":[237,1383,454,137,357,182,156],"class_list":["post-12255","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gaming","category-visual-studio","tag-net","tag-c","tag-cicd","tag-html","tag-sql","tag-unity","tag-visual-studio-2017"],"acf":[],"blog_post_summary":"<p>Many developers tell us that they are under pressure to deliver software on an ever-faster cadence. This pressure for increased speed makes building your software at high quality from the start even more important \u2013 you want to make sure that any commits you make to your codebase are at the right quality, to avoid [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/12255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=12255"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/12255\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=12255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=12255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=12255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}