From e5c2807edfdc270e037080dc122845e5803ca21d Mon Sep 17 00:00:00 2001 From: yzuowei Date: Fri, 27 Jan 2023 10:07:47 +0800 Subject: [PATCH] translated --- ...ï¸ 10 universal steps for open source code review.md | 115 +++++++++--------- 1 file changed, 59 insertions(+), 56 deletions(-) diff --git a/sources/tech/20221031.1 â­ï¸â­ï¸â­ï¸ 10 universal steps for open source code review.md b/sources/tech/20221031.1 â­ï¸â­ï¸â­ï¸ 10 universal steps for open source code review.md index 3a5c517c3a..a7b84ce098 100644 --- a/sources/tech/20221031.1 â­ï¸â­ï¸â­ï¸ 10 universal steps for open source code review.md +++ b/sources/tech/20221031.1 â­ï¸â­ï¸â­ï¸ 10 universal steps for open source code review.md @@ -2,118 +2,120 @@ [#]: via: "https://opensource.com/article/22/10/code-review" [#]: author: "Martin Kopec https://opensource.com/users/martin-kopec" [#]: collector: "lkxed" -[#]: translator: "yzuowei" +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " -10 universal steps for open source code review +å¼€æºä»£ç è¯„审的å个通用步骤 ====== -Code review doesn't have to be scary when you follow this universal process. +åªè¦ä½ éµå¾ªè¿™äº›é€šç”¨æµç¨‹ï¼Œä»£ç è¯„审code reviewå¹¶ä¸å¯æ€•。 -Have you ever found yourself in a situation where you needed to do a code review but didn't fully understand the project? Maybe you did not review it to avoid looking like you didn't know what you were doing. +ä½ æ˜¯å¦æ›¾éœ€è¦å¯¹ä»£ç è¿›è¡Œè¯„审,但你还没有完全ç†è§£æ•´ä¸ªé¡¹ç›®ï¼Ÿæˆ–许你é¿å¼€åŽ»è¯„å®¡ä»Žè€Œé¿å…你看起æ¥åƒæ˜¯ä»€ä¹ˆéƒ½ä¸çŸ¥é“的洋相。 -This article assures you that there's a better way. You don't need to know everything to provide a code review. In fact, based on my experience, that's quite common. +本篇文章想è¦å‘Šè¯‰ä½ ä¸€ä¸ªæ›´å¥½çš„æ–¹æ³•。代ç è¯„审并ä¸éœ€è¦ä½ çŸ¥é“所有事情。实际上,就我个人ç»éªŒè€Œè¨€ï¼Œè¿™ç§æƒ…况éžå¸¸æ™®é。 -I remember when I joined Red Hat as an intern and was asked to help with code reviews. We used a system of +1 or -1 votes, and I was initially very hesitant to weigh in. I found myself asking whether when I gave a +1 on a change but then someone else voted -1, would I look foolish? +我还记得在我刚加入红帽Red Hatåšå®žä¹ çš„æ—¶å€™ï¼Œæˆ‘è¢«è¦æ±‚å‚与代ç è¯„审。我们当时采å–的是 +1 或 -1 的投票系统,而我在一开始的时候常常踌躇该如何评审。我å‘现我总是问自己对于一处改动是å¦åº”该给予 +1 å½“åˆ«äººå·²ç»æŠ•äº† -1,我会看起æ¥å¾ˆè ¢å—? -What does happen if someone votes -1 on a change you've vote +1? The answer is nothing! You might have missed a detail that the other person noticed. It's not the end of the world. That's why we have this voting system. Like the rest of open source, merging code is a collaborative effort. +如果你对一处改动投了 +1, ä½†æ˜¯åˆ«äººåˆæŠ•äº† -1ï¼Œè¿™åˆæ„味ç€ä»€ä¹ˆå‘¢ï¼Ÿè¿™ä¸æ„味任何事ï¼ä½ å¯èƒ½åªæ˜¯æ¼æŽ‰äº†ä¸€å¤„ç»†èŠ‚è€Œåˆ«äººåˆæ°å¥½æ³¨æ„åˆ°äº†ã€‚è¿™ä¸æ„味ç€ä¸–ç•Œæœ«æ—¥ã€‚è¿™ä¹Ÿæ˜¯ä¸ºä»€ä¹ˆæˆ‘ä»¬ä¼šç”¨æŠ•ç¥¨ç³»ç»Ÿã€‚æ­£å¦‚åŒæ‰€æœ‰å¼€æºé¡¹ç›®ä¸€æ ·ï¼Œä»£ç åˆå¹¶æ˜¯ä¸€é¡¹ååŒå·¥ä½œã€‚ -Lately, I've been so inundated with code reviews that I can hardly keep up with them. I also noticed that the number of contributors doing these reviews steadily decreased. +最近,我接到了太多的代ç è¯„审工作以至于我难以维æŒè¿›åº¦ã€‚æˆ‘åŒæ—¶ä¹Ÿæ³¨æ„到了å‚ä¸Žè¯„å®¡çš„è´¡çŒ®è€…æ•°é‡æ­£åœ¨ç¨³æ­¥å‡å°‘。 -For this reason, I'm writing about my point of view on writing a code review. In this article, I'll share some helpful tips and tricks. I'll show you a few questions you should ask yourself and a few ideas of what to look for when doing a code review. +基于这个原因,我想è¦å†™ä¸€ç¯‡æ–‡ç« é˜è¿°æˆ‘对代ç è¯„审的个人观点。在这篇文章里,我会分享一些诀çªä¸ŽæŠ€å·§ã€‚我会å‘你展示几个问题你å¯ä»¥ç”¨æ¥è‡ªé—®è‡ªç­”ï¼Œæˆ‘ä¹Ÿä¼šä¸ºåœ¨è¯„å®¡ä»£ç æ—¶éœ€è¦æ³¨æ„什么æä¾›ä¸€äº›æƒ³æ³•。 -### What is the purpose of a code review? +### 代ç è¯„审的目的是什么? -Have you ever written a really simple patch? Something you think is so trivial that it doesn't require a review? Maybe you merged it straight away. Later, it turns out there was a mistake, something obvious or silly, like the wrong indentation or a few duplicated lines of code instead of a function call (yes, I'm speaking from experience!). +ä½ æ˜¯å¦æ›¾å†™è¿‡ä¸€ä¸ªéžå¸¸ç®€å•的补ä¸ï¼Ÿè¡¥ä¸å¤ªè¿‡ç碎以至于你认为评审是多余的?或许你马上进行了åˆå¹¶ã€‚直到晚些时候,你æ„识到你犯了个错误,一个明显或是愚蠢的错误,或是错误缩进,或是几行é‡å¤çš„代ç åœ¨æœ¬å¯ä»¥è°ƒç”¨å‡½æ•°çš„地方(是的,这些都是ç»éªŒä¹‹è°ˆï¼ï¼‰ã€‚ -A code review by someone else would have caught these things. +ä¸€æ®µä»£ç æœ¬å¯ä»¥äº¤äºˆä»–äººè¯„å®¡å¹¶åŠæ—¶å‘现这些问题。 -The point of a code review is to bring a fresh pair of eyes with a new perspective on the problem you're trying to solve. That new context is exactly the reason a code review is crucial. +代ç è¯„审的一个目的便是为你在å°è¯•解决的问题带æ¥ä¸€åŒå…¨æ–°çš„视角。新开阔的视野也正是为什么代ç è¯„审至关é‡è¦ã€‚ -You may think that you must be an expert in the language to review someone else's code, the project, or both. Here's a secret all code reviewers want you to know: That's wrong! You don't need to fully understand the project or the language to provide a fresh perspective on a change. There's a universal process of code review. +ä½ å¯èƒ½ä¼šè®¤ä¸ºè¯„审别人的代ç éœ€è¦ä½ æ˜¯ä¸€å专家,或是编程语言专家,或是项目专家,或两者兼具。让我æ¥å‘Šè¯‰ä½ ä¸€ä¸ªæ‰€æœ‰ä»£ç è¯„审者都想跟你说的秘密å§ï¼šå¤§é”™ç‰¹é”™ï¼ä½ å¹¶ä¸éœ€è¦å®Œå…¨ç†è§£é¡¹ç›®æˆ–者编程语言æ¥ä¸ºæ”¹åЍæä¾›å…¨æ–°è§†è§’。我将å‘你展示代ç è¯„审的通用æµç¨‹ã€‚ -### The universal process of a code review +### 代ç è¯„审的通用æµç¨‹ -Here's my process for code review, grouped into a couple of points. The process provides questions I ask myself to help me focus on a code change and its consequences. You don't need to go in this specific order. If there's a step, you can't execute for any reason, just move to another step. +这是我的代ç è¯„审æµç¨‹è¢«æ‹†åˆ†æˆå‡ ä¸ªè¦ç‚¹ã€‚这个æµç¨‹åŒ…å«äº†æˆ‘会问我自己的一些问题,以帮助我专注于代ç çš„å˜åŒ–以åŠå…¶åŽæžœã€‚ä½ ä¸éœ€è¦ä¸¥æ ¼ä¾ç…§é¡ºåºæ¥è¿›è¡Œè¯„审。如果有任何原因导致你无法执行其中的æŸä¸€æ­¥ï¼Œè·³è¿‡é‚£ä¸€æ­¥å°±å¥½ã€‚ -### 1. Understand the change, what it's trying to solve, and why +### 1. ç†è§£æ”¹åŠ¨ï¼Œé—®æ”¹åŠ¨æƒ³è¦è§£å†³çš„问题,以åŠä¸ºä»€ä¹ˆè¦è§£å†³è¿™ä¸ªé—®é¢˜ -The explanation of why the change is needed and any relevant context should be in the commit message. If it isn't, request it and feel free to -1 until it's provided. +ä¸ºä»€ä¹ˆéœ€è¦æ”¹åŠ¨çš„è§£é‡Šä»¥åŠä»»ä½•相关背景都应该被放在æäº¤commitä¿¡æ¯é‡Œã€‚å¦‚æžœæ²¡æœ‰ï¼Œè¦æ±‚相关信æ¯å¹¶è¯·é𿄿Е -1 直到相关信æ¯è¢«æä¾›ã€‚ -Is it something that needs to be solved? Is it something the project should focus on, or is it completely out of scope? +改动想解决的问题需è¦è¢«è§£å†³å—?它是项目应当èšç„¦çš„问题,还是与项目完全无关? -### 2. How would you implement the solution? Would it be different? +### 2. 你会如何实现解决方案?它会ä¸ä¸€æ ·å—? -At this point, you know what the code change is about. How would you have done it? Think about this before reviewing the change in detail. If the solution you have in mind is different from the one you're reviewing, and you think it's better, bring that up in the review. You don't need to -1 it; just ask why the author didn't go in this direction and see how the discussion evolves. +在这个时候,你应该已ç»çŸ¥é“ä»£ç æ”¹åŠ¨æ˜¯ä¸ºäº†ä»€ä¹ˆã€‚æ¢åšæ˜¯ä½ ä¼šæ€Žä¹ˆåšï¼Ÿåœ¨è¿›ä¸€æ­¥å¯¹æ”¹åŠ¨è¿›è¡Œç»†èŠ‚è¯„å®¡å‰æ€è€ƒè¿™ä¸ªé—®é¢˜ã€‚如果你想出了一个ä¸ä¸€æ ·çš„解法,并且你认为你的解法更好,在评审中æå‡ºæ¥ã€‚ä½ ä¸éœ€è¦æŠ• -1;去问问作者为什么没有往那个方å‘走,看看这次讨论会把你们带å‘何方。 -### 3. Run the code with and without the change +### 3. è¿è¡Œæœ‰æ”¹å˜å’Œæ— æ”¹å˜çš„ä»£ç  -I usually put a few breakpoints into the code, run it, and inspect how the new code interacts with the rest. +我通常会在代ç ä¸­è®¾ç½®å‡ ä¸ªæ–­ç‚¹ï¼Œè¿è¡Œä»£ç å¹¶æ£€æŸ¥æ–°ä»£ç æ˜¯å¦‚何与其余部分互动的。 -If you can't run the whole code, try to copy the function containing the new code to a new local file, simulate the input data, and run that. This is helpful when you either don't know how to run the whole project or when it requires a specific environment to which you don't have access. +如果你无法è¿è¡Œæ•´ä¸ªä»£ç ï¼Œè¯•ç€å°†å¸¦æœ‰æ–°ä»£ç çš„函数å¤åˆ¶åˆ°ä¸€ä¸ªæ–°çš„æœ¬åœ°æ–‡ä»¶ï¼Œæ¨¡æ‹Ÿè¾“入数æ®ï¼Œç„¶åŽè¿è¡Œã€‚这在你ä¸çŸ¥é“怎么è¿è¡Œæ•´ä¸ªé¡¹ç›®æˆ–者无法接触到è¿è¡Œæ‰€éœ€çš„特殊环境时很有帮助。 -### 4. Can the new code break anything? +### 4. 新代ç ä¼šç ´å任何东西å—? -I mean, really anything. Think about the consequences. +我是说,任何东西。想一想å¯èƒ½çš„åŽæžœã€‚ -In the case of a new command-line option, will it always be accepted by the target? +以一个新的命令行选项为例,它会总是被目标所接å—å—? -Can a situation occur when the option wouldn't be accepted or when it could conflict with something? +是å¦å­˜åœ¨è¿™æ ·ä¸€ç§æƒ…å†µä½¿å¾—æ–°é€‰é¡¹æ— æ³•è¢«æŽ¥å—æˆ–是会与其他东西起冲çªï¼Ÿ -Maybe it's a new import. Is the new library, and possibly a new dependency, available in the older releases or systems you ship the project for? +æˆ–è®¸æ–°ä»£ç æ˜¯ä¸€ä¸ªæ–°çš„导入。那么这个新的库,很å¯èƒ½ä¹Ÿæ˜¯æ–°çš„ä¾èµ–,能够在è€ç‰ˆæœ¬æˆ–者项目的è¿è¡Œç³»ç»Ÿä¸­è¢«æ‰¾åˆ°å—? -What about security? Is the new dependency safe to use? The least you can do is run a quick Internet search to find out. Also, look for warnings in the console log. Sometimes there are more secure methods within the same library. +安全方é¢å‘¢ï¼Ÿæ–°çš„ä¾èµ–足够安全å—?你至少å¯ä»¥åœ¨ç½‘上快速地æœç´¢ä¸€ä¸‹ã€‚还有,注æ„ä¸€ä¸‹æŽ§åˆ¶å°æ—¥å¿—é‡Œçš„è­¦å‘Šã€‚æœ‰çš„æ—¶å€™åœ¨åŒæ ·çš„库里也å¯ä»¥æ‰¾åˆ°æ›´å®‰å…¨çš„æ–¹æ³•。 -### 5. Is the code effective? +### 5. æ–°ä»£ç æ˜¯å¦æœ‰æ•ˆï¼Ÿ -You've determined that the proposed solution is probably correct. Now it's time to check the code itself, its effectiveness, and its necessity. +你刚刚确认了被æå‡ºçš„è§£å†³æ–¹æ¡ˆå¤§æ¦‚æ˜¯æ­£ç¡®çš„ã€‚çŽ°åœ¨è¯¥æ£€æŸ¥ä»£ç æœ¬èº«äº†ã€‚你需è¦å…³æ³¨ä»£ç çš„æœ‰æ•ˆæ€§å’Œå¿…è¦æ€§ã€‚ -Check the style of the new code. Does it match the style of the project? Any open source project has (or should have) a document informing (new) contributors about the styles and good practices the project follows. +检查新代ç çš„风格。它与项目的代ç é£Žæ ¼ç›¸åŒ¹é…å—?任何开æºé¡¹ç›®éƒ½ï¼ˆåº”该)有一份文档告知(新)贡献者项目所éµå¾ªçš„风格和优秀实践。 -For instance, every project in the OpenStack community has a HACKING.rst file. There's often also [a guide for new contributors][1] with all the must-know information. +比如说,OpenStack 社区的所有项目都有一份 HACKING.rst 文件。你ç»å¸¸ä¹Ÿèƒ½æ‰¾åˆ°ä¸€ä»½[新贡献者指å—][1]åŒ…å«æ‰€æœ‰å¿…须知é“的信æ¯ã€‚ -### 6. Check that all new variables and imports are used +### 6. 确认所有新增的å˜é‡å’Œå¯¼å…¥éƒ½è¢«ä½¿ç”¨ -Often, there have been many iterations of the code you're reviewing, and sometimes the final version is very different from when it started. It's easy to forget an import or a new variable that was needed in a former version of the new code. Automation usually checks these things using linting tools like [flake8][2] in the case of Python code. +你正在评审的代ç å¸¸å¸¸å·²ç»è¿‡å¤šæ¬¡è¿­ä»£ï¼Œæœ‰çš„æ—¶å€™ä»£ç çš„æœ€ç»ˆç‰ˆæœ¬ä¸Žåˆå§‹ç‰ˆå·²è¿¥ç„¶ä¸åŒã€‚所以我们很容易忘记一些在历å²ç‰ˆæœ¬ä¸­åŠ å…¥çš„å˜é‡ä¸Žå¼•用。自动化检测通常会用到 lint 工具,类似 Python 中的 [flake8][12]。 -Can you rewrite the code without declaring new variables? Well, usually, yes, but the question is whether it's better that way. Does it bring any benefit? The goal isn't to create as many one-liners as possible. The goal is to write code that is both efficient and easy to read. +(LCTT 译注:[lint][5] 指编程中用æ¥å‘çŽ°ä»£ç æ½œåœ¨é”™è¯¯å’Œçº¦æŸä»£ç é£Žæ ¼çš„工具,起æºäºŽ C è¯­è¨€ç¼–ç¨‹ä¸­çš„é™æ€åˆ†æžå·¥å…· lint。lint 本æ„为衣æœä¸Šç§¯ç´¯çš„绒毛与ç°å°˜ï¼Œlint çš„å–å寓æ„åˆ™åœ¨äºŽæ•æ‰ç¼–程时产生的“绒毛与ç°å°˜â€ï¼‰ -### 7. Are the new functions or methods necessary? +ä½ å¯ä»¥åœ¨ä¸å£°æ˜Žæ–°å˜é‡çš„æƒ…况下é‡å†™ä»£ç å—?通常情况下你å¯ä»¥ï¼Œä½†é—®é¢˜æ˜¯è¿™æ ·æ˜¯å¦æ›´å¥½ã€‚这会带æ¥ä»€ä¹ˆç›Šå¤„å—ï¼Ÿæˆ‘ä»¬çš„ç›®æ ‡ä¸æ˜¯å¤šå†™èбå¼çš„一行代ç ï¼Œè€Œæ˜¯å†™å‡ºé«˜æ•ˆä¸”易读的代ç ã€‚ -Is there a similar function that can be reused somewhere in the project? It's always worth helping to avoid reinventing the wheel and re-implementing logic that's already been defined. +### 7. 新的函数和方法是å¦å¿…è¦ï¼Ÿ -### 8. Are there unit tests? +项目里的别的地方是å¦å­˜åœ¨å¯ä»¥è¢«å¤ç”¨çš„功能类似的函数?确ä¿é¿å…釿–°å‘明轮å­ä»¥åŠé‡æ–°å®žçް已ç»è¢«å®šä¹‰çš„逻辑永远都是值得的。 -If the patch adds a new function or new logic in a function, it should also include new unit tests for that. It's always better when the author of a new function also writes unit tests for it. +### 8. 有å•元测试å—? -### 9. Verify refactoring +如果补ä¸å¢žåŠ äº†æ–°çš„å‡½æ•°æˆ–è€…åœ¨å‡½æ•°å†…æ·»åŠ äº†æ–°çš„é€»è¾‘ï¼Œå®ƒä¹Ÿåº”è¯¥é™„å¸¦å¯¹åº”çš„å•元测试。新函数的作者总是比别人更适åˆå†™è¯¥å‡½æ•°çš„å•元测试。 -If the commit refactors existing code (it renames a variable, changes variable scope, changes the footprint of a function by adding or removing arguments, or removes something), ask yourself: +### 9. 验è¯é‡æž„ -- Can this be removed? Will it affect the stable branch? -- Are all the occurrences deleted? +如果这次æäº¤å¯¹çŽ°æœ‰ä»£ç è¿›è¡Œäº†é‡æž„(它å¯èƒ½é‡å‘½å了æŸä¸ªå˜é‡ï¼Œæˆ–者是改å˜äº†çš„å˜é‡çš„作用域,或者是通过加å‡å‚æ•°æ¥æ”¹å˜å‡½æ•°çš„è¶³è¿¹ï¼Œåˆæˆ–者是删去了æŸä¸ªä¸œè¥¿ï¼‰ï¼Œé—®ä¸€é—®ä½ è‡ªå·±ï¼š -You can use the [grep command][3] to find out. You wouldn't believe how many times I've voted -1 just because of this. This is a simple mistake that anyone can make, but that also means anyone can uncover it. +- 这个å¯ä»¥è¢«åˆ é™¤å—?它会影å“到稳定分支å—? +- 所有出现的地方都删掉了å—? -The owner of the commit can easily overlook these things, which is totally understandable. It's happened to me many times too. I'd finally figured out the root of the problem I'd been fixing, so I was in a rush to propose the review, and then I forgot to check the whole repo. +ä½ å¯ä»¥åˆ©ç”¨ [grep 命令][3]æ¥æŸ¥æ‰¾ã€‚ä½ ä¸ä¼šç›¸ä¿¡æœ‰å¤šå°‘次我投 -1 就是因为这个。这是一个任何人都会犯的错误,也正因如此任何人都å¯ä»¥å‘现它。 -Apart from the project's repository, sometimes it's also necessary to check other code consumers. If some other project imports this one, they may need refactoring, too. In the OpenStack community, we have a tool that searches across every community project. +æäº¤çš„æ‰€æœ‰è€…很容易忽略这些事情,这完全å¯ä»¥ç†è§£ã€‚我也犯过很多次这ç§é”™è¯¯ã€‚我最终å‘现问题的根æºåœ¨äºŽæˆ‘太急于æå‡ºè¯„审,以至于我忘记了对仓库进行整体检查。 -### 10. Does project documentation need to be modified? +除了对项目仓库的检查外,检查其他代ç ç”¨æˆ·ä¹Ÿå分必è¦ã€‚如果有别的项目导入了这个项目,它们å¯èƒ½ä¹Ÿéœ€è¦è¿›è¡Œé‡æž„。在 OpenStack ç¤¾åŒºä¸­ï¼Œæˆ‘ä»¬æœ‰å¯¹åº”çš„å·¥å…·æ¥æŸ¥è¯¢åˆ«çš„社区项目。 -Again, you can use the [grep command][4] to check whether the project documentation mentions anything related to the code change. Apply common sense to determine whether a change needs to be documented for end users or it's just an internal change that doesn't affect user experience. +### 10. 项目文档是å¦éœ€è¦åšå‡ºæ›´æ”¹ï¼Ÿ -### Bonus tip: Be considerate +ä½ å¯ä»¥å†ä¸€æ¬¡ä½¿ç”¨ [grep 命令][4]æ¥æ£€æŸ¥åœ¨é¡¹ç›®æ–‡æ¡£ä¸­æ˜¯å¦æåˆ°äº†ç›¸å…³çš„ä»£ç æ”¹åŠ¨ã€‚ç”¨å¸¸è¯†æ¥åˆ¤æ–­è¿™æ¬¡æ”¹åŠ¨æ˜¯å¦éœ€è¦è¢«æ”¶å…¥æ–‡æ¡£ä»¥å‘ŠçŸ¥æœ€ç»ˆç”¨æˆ·ï¼Œè¿˜æ˜¯åªæ˜¯ä¸€ä¸ªä¸ä¼šå½±å“用户体验的内部å˜åŒ–。 -Be considerate, precise, and descriptive if you make a suggestion or comment on something after you've reviewed the new code. Ask questions if you don't understand something. If you think the code is wrong, explain why you think so. Remember, the author can't fix it if they don't know what's broken. +### é¢å¤–æç¤ºï¼šè€ƒè™‘周到 -### Final words +当你在评审完新代ç åŽæå‡ºå»ºè®®æˆ–è¯„è®ºæ—¶ï¼Œè¦è€ƒè™‘周到,å馈准确,æè¿°è¯¦å°½ã€‚如果有你ä¸ç†è§£çš„地方就å‘出æé—®ã€‚如果你认为代ç å­˜åœ¨é”™è¯¯ï¼Œè§£é‡Šä½ çš„ç†ç”±ã€‚è®°ä½ï¼Œä½œè€…无法修å¤ä»–ä¸çŸ¥é“çš„æ¼æ´žã€‚ -The only bad review is no review. By reviewing and voting, you provide your point of view and vote only for that. Nobody expects you to give the final yes or no (unless you're a core maintainer!), but the voting system allows you to provide your perspective and opinion. A patch owner will be glad you did it, trust me. +### 最åŽå‡ å¥ -Can you think of any other steps for a good review? Do you have any special technique different from mine? Let us all know in the comments! +唯一的å评审是没有评审。通过评审和投票,你æä¾›äº†ä½ çš„观点并为此å‘声。没有人指望你æ¥åšå‡ºæœ€ç»ˆå†³å®šï¼ˆé™¤éžä½ æ˜¯æ ¸å¿ƒç»´æŠ¤è€…),但是投票系统å…许你æä¾›ä½ çš„观点和æ„è§ã€‚ç›¸ä¿¡æˆ‘ï¼Œè¡¥ä¸æ‰€æœ‰è€…会很高兴你这么åšäº†çš„。 + +你能想到别的è¦ç‚¹æ¥ç»™å‡ºå¥½çš„评审å—ï¼Ÿä½ æ˜¯å¦æœ‰æˆ‘ä¸çŸ¥é“的特殊技巧?在评论中分享它们å§ï¼ -------------------------------------------------------------------------------- @@ -121,7 +123,7 @@ via: https://opensource.com/article/22/10/code-review 作者:[Martin Kopec][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[yzuowei](https://github.com/yzuowei) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) è£èª‰æŽ¨å‡º @@ -132,3 +134,4 @@ via: https://opensource.com/article/22/10/code-review [2]: https://opensource.com/article/19/5/python-flake8 [3]: https://opensource.com/downloads/grep-cheat-sheet [4]: https://www.redhat.com/sysadmin/how-to-use-grep +[5]: https://codedocs.org/what-is/lint-software