{"id":8746,"date":"2016-03-30T11:06:59","date_gmt":"2016-03-30T09:06:59","guid":{"rendered":"https:\/\/daniel.haxx.se\/blog\/?p=8746"},"modified":"2016-03-30T11:06:59","modified_gmt":"2016-03-30T09:06:59","slug":"decent-durable-defect-density-displayed","status":"publish","type":"post","link":"https:\/\/daniel.haxx.se\/blog\/2016\/03\/30\/decent-durable-defect-density-displayed\/","title":{"rendered":"decent durable defect density displayed"},"content":{"rendered":"<p>Here&#8217;s an encouraging graph from our regular <a href=\"https:\/\/scan.coverity.com\/projects\/curl\">Coverity scans<\/a> of the <a href=\"https:\/\/curl.haxx.se\/\">curl<\/a> <a href=\"https:\/\/github.com\/curl\/curl\">source code<\/a>, showing that we&#8217;ve maintained a fairly low &#8220;defect density&#8221; over the last two years, staying way below the average density level.<br \/>\n<a href=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2016\/03\/defect-density-over-time.png\" rel=\"attachment wp-att-8754\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8754\" src=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2016\/03\/defect-density-over-time.png\" alt=\"defect density over time\" width=\"1011\" height=\"353\" srcset=\"https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2016\/03\/defect-density-over-time.png 1011w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2016\/03\/defect-density-over-time-200x70.png 200w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2016\/03\/defect-density-over-time-450x157.png 450w, https:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2016\/03\/defect-density-over-time-768x268.png 768w\" sizes=\"auto, (max-width: 1011px) 100vw, 1011px\" \/><\/a>Click the image to view it slightly larger.<\/p>\n<p><em>Defect density<\/em> is simply the number of found problems per 1,000 lines of code. As a little (and probably unfair) comparison, right now when curl is flat on 0, Firefox is at 0.47, c-ares at 0.12 and libssh2 at 0.21.<\/p>\n<p>Coverity is still the <a href=\"https:\/\/daniel.haxx.se\/blog\/2012\/07\/12\/three-static-code-analyzers-compared\/\">primary static code analyzer<\/a> for C code that I&#8217;m aware of. None of the flaws Coverity picked up in curl during the last two years were detected by clang-analyzer for example.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s an encouraging graph from our regular Coverity scans of the curl source code, showing that we&#8217;ve maintained a fairly low &#8220;defect density&#8221; over the last two years, staying way below the average density level. Click the image to view it slightly larger. Defect density is simply the number of found problems per 1,000 lines &hellip; <a href=\"https:\/\/daniel.haxx.se\/blog\/2016\/03\/30\/decent-durable-defect-density-displayed\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">decent durable defect density displayed<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,11,393],"tags":[213,196,33,86,424,343],"class_list":["post-8746","post","type-post","status-publish","format-standard","hentry","category-curl","category-development","category-firefox-floss","tag-c-ares","tag-coveritycom","tag-curl-and-libcurl","tag-firefox","tag-libssh2","tag-source-code"],"_links":{"self":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/8746","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/comments?post=8746"}],"version-history":[{"count":13,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/8746\/revisions"}],"predecessor-version":[{"id":8766,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/8746\/revisions\/8766"}],"wp:attachment":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media?parent=8746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/categories?post=8746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/tags?post=8746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}