日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

codereview介绍

發布時間:2025/4/5 编程问答 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 codereview介绍 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1. 定義:

Code review?is systematic examination (often known as?peer review) of computer?source code. It is intended to find and fix?mistakes?overlooked in the?initial development phase, improving both the overall?quality of software?and the developers' skills. Reviews are done in various forms such as?pair programming, informal walkthroughs, and formal?inspections。

2. 介紹

Code reviews can often find and remove common?vulnerabilities?such as?format string exploits,?race conditions,?memory leaks?and?buffer overflows, thereby improving software security. Online software repositories based on?Subversion?(with?Redmine?or?Trac),?Mercurial,?Git?or others allow groups of individuals to collaboratively review code. Additionally, specific?tools?for collaborative code review can facilitate the code review process.

Automated?code reviewing software?lessens the task of reviewing large chunks of code on the?developer?by systematically checking source code for known vulnerabilities. A 2012 study by VDC Research reports that 17.6% of the embedded software engineers surveyed currently use automated tools for peer code review and 23.7% expect to use them within 2 years.[2]

Capers Jones' ongoing analysis of over 12,000 software development projects showed that the latent defect discovery rate of formal inspection is in the 60-65% range.[ambiguous]?For informal inspection, the figure is less than 50%.[citation needed]?The latent defect discovery rate for most forms of testing is about 30%.[3]

Typical code review rates are about 150 lines of code per hour. Inspecting and reviewing more than a few hundred lines of code per hour for critical software (such as safety critical?embedded software) may be too fast to find errors.[4][5]?Industry data indicates that code reviews can accomplish at most an 85% defect removal rate with an average rate of about 65%.[6]

The types of defects detected in code reviews have also been studied. Based on empirical evidence it seems that up to 75% of code review defects affect software evolvability rather than functionality making code reviews an excellent tool for software companies with long product or system life cycles

3.分類:

Code review practices fall into three main categories: pair programming, formal code review and lightweight code review.[1]

Formal code review, such as a?Fagan inspection, involves a careful and detailed process with multiple participants and multiple phases. Formal code reviews are the traditional method of review, in which?software developers?attend a series of meetings and review code line by line, usually using printed copies of the material. Formal inspections are extremely thorough and have been proven effective at finding defects in the code under review.[citation needed]

Lightweight code review typically requires less overhead than formal code inspections, though it can be equally effective when done properly.[citation needed]Lightweight reviews are often conducted as part of the normal development process:

  • Over-the-shoulder – One developer looks over the author's shoulder as the latter walks through the code.
  • Email pass-around – Source code management system emails code to reviewers automatically after checkin is made.
  • Pair Programming?– Two authors develop code together at the same workstation, such is common in?Extreme Programming.
  • Tool-assisted code review – Authors and reviewers use specialized tools designed for peer code review.

Some of these may also be labeled a "Walkthrough" (informal) or "Critique" (fast and informal).

Many teams that eschew traditional, formal code review use one of the above forms of lightweight review as part of their normal development process. A code review case study published in the book?Best Kept Secrets of Peer Code Review?found that lightweight reviews uncovered as many bugs as formal reviews, but were faster and more cost-effective.

4.常見的code-review tool

開源軟件:

  • Gerrit, forked from?Rietveld.Used by the?Android?project.
  • Differential, part of the?Phabricator?suite originally developed by?Facebook's Developer Tools team.Used by the?LLVM?family of projects.
  • Review Board
  • Rietveld, a tool adapted from an internal?Google?project, Mondrian, for code reviews.

比較:

SoftwareMaintainerDevelopment statusLicenseVCS supportedPlatforms supportedWorkflowCostDifferential (Phabricator)GerritReview BoardRietveld
phabricator.orgactively developedApache?v2Subversion, Git, MercurialPHPpre-commit, post-commitFree
Shawn Pearceactively developedApache?v2GitJava EEpre-commitFree
reviewboard.orgactively developedMITCVS, Subversion, Git, Mercurial, Bazaar, Perforce, ClearCase, Plastic SCMPythonmainly pre-commitFree
Guido van Rossumactively developedApache?v2Git, SubversionPythonpre-commitFree

reference:

http://en.wikipedia.org/wiki/Code_review

http://en.wikipedia.org/wiki/List_of_tools_for_code_review

轉載于:https://www.cnblogs.com/davidwang456/p/3693123.html

總結

以上是生活随笔為你收集整理的codereview介绍的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。