Inquiry code review (Code review)

What is the Code review

Systematic examination of the source code for the software, find software source code quality problem, structures, and other vulnerabilities.

PS: Code review ≈ Code inspections ≥ Code walkthroughs (code review) 

        Code walkthroughs equivalent informal Code review.

 

How to perform the Code review

1. Use the code static analysis tool.

The code static analysis tool will supplement their own code review code.

To ESlint example.

Process: (1) mounted ESlint kit.

            (2) development team leader and member of the jointly developed ESlint configuration file and share this file.

            After (3) ESlint profile finalized, team leader and member of the joint use ESlint profile and in strict accordance with this specification code.

PS: Code Static analysis tools help developers conduct a preliminary review of the code in the native encoding to reduce the required team members in the development of mutual inspection of code review project to improve the efficiency of the code review.

 

2. version control (cross-check).

Considering the cost and the efficiency of learning, use version control tool that comes with lightweight code review tool is the best choice.

To Pull Request GitHub example.

Process: (1) create a good matser main branch on GitHub, feature multiple branches, multiple feature sub-branches. Matser main branch of the leader, feature not writable read-only branch, feature subbranches readable and writable. (Generally not the main branch of the code review Matser, feature branch, feature code needs to review the child branch)

           (2) an encoding module working head arrangement of each member, each member is coded, and submit the code, then push pull request feature subbranches.

           (3) team leader or members be lightweight code review feature sub-branch of the source code submitted.

           Source (4) team leader or members to feature sub-branch has submitted questionable conduct code review, and advise the responsible members of a branch of the feature to modify the source code to fix known problems.

           After (5) team leader or members to confirm the source of the feature sub-branch submitted through code review, will feature a team leader in charge of the sub-branch into the feature branch.

           (6) When the respective coding branch completion feature, and then merged into the main branch Matser.

           Before (7) publishing software, to conduct a formal code review. (This process is painful, too much code to see the case may be.)

PS: code review should note the following three points:

        (1) is a code review, not the browser code. (Reminds me of the former primary school teacher working in copying a book written in kanji characters "read.") 

        (2) component code to be reviewed, not a lot of review. (Most of the professionals are saying, in line with the actual situation.)      

        (3) code to be mutual inspection, not a single check. (Three lines must be my teacher, even the sage Confucius, but also humbly ask someone else.)

        (4) have questioned the code of conduct detailed comments, questions and feedback optimization recommendations. (Do not always pick the wrong done not to tell others how to do, not necessarily all very smart, one would understand, it is recommended to optimize the recommendations say.)

PS: the proposed project functional modules lightweight informal code review after completion, or are likely to affect the efficiency of development, interrupted thinking developers, not focused development work.

 

Code review project     

Late point in my blog will "explore the code refactoring" supplement, because the project is to review the reconstruction project, to be determined. . .

 

Code review of the advantages and disadvantages

Benefits: improve code quality, and promote team communication and knowledge sharing, identify potential vulnerabilities of the code.

Disadvantages: increased workload, affecting relationships.

 

Summary: Code review is a good way, but not necessarily for all development teams and software products.

           Short life cycle software projects or lack of experience of the development team is not recommended for code review.

           Code reviews Suggested recommendations, barely not happy.    

Guess you like

Origin www.cnblogs.com/Sroot/p/10860999.html
Recommended