英文阅读-LinkedIn‘s Tips for Highly Effective Code Review

88 阅读1分钟

LinkedIn的CR技巧

LinkedIn团队CodeReview经验与方法,原文来自thenewstack.io/linkedin-co…

总结

  • Do I Understand the “Why”? 在提交pr的同时需要描述本次修改的“动机”,有助于提高代码文档质量。

  • Am I Giving Positive Feedback? 当reviewer看到优秀代码需要给出正反馈。

  • Is My Code Review Comment Explained Well? comment需要简洁易懂,比如"reduces duplication", "improves coverage"等等

  • Do I Appreciate the Submitter’s Effort? 每一次pr都需要被感谢,不管结果如何,使用谢谢

  • Would This Review Comment Be Useful to Me? 减少不必要的comment,比如代码格式有问题,开发者需要将CR意见当成有用的工具

  • Is the “Testing Done” Section Thorough Enough? 每一次变更都需要通过单元/接口测试

  • Am I Too Pedantic in My Review? 养成CR习惯,不要当成一种负担。养成一种心态:别人要CR我的代码,至少我的代码在自己CR下能够满意。