1
1
# Reviewer Crash Course
2
2
3
- by * Sirryan *
3
+ by _ Sirryan _
4
4
5
5
Hey everyone, I noticed some people were not sure how to approach reviewing PRs
6
6
so I figured I would write up a small guide on PR reviewing and how people like
7
- our Headcoders, commit access , Lewcc, S34N, and I all do our jobs. In addition
7
+ our Headcoders, maintainers , Lewcc, S34N, and I all do our jobs. In addition
8
8
to some guidance and pointers on PR reviewing, I will also go over a few code
9
9
examples and point out code standard corrections and basic errors that
10
10
prospective reviewers can begin to start on.
11
11
12
12
## What is code review?
13
13
14
- > Code reviews act as quality assurance of the code base.... * and * can also act
14
+ > Code reviews act as quality assurance of the code base.... _ and _ can also act
15
15
> as a second step in identifying bugs, logic problems, or uncovered edge cases.
16
16
> [ (source)] ( https://about.gitlab.com/topics/version-control/what-is-code-review/ )
17
17
@@ -54,14 +54,15 @@ their own code and help you understand their intention and goals. Please note:
54
54
ITS IMPORTANT TO READ PR DESCRIPTIONS, you should not be reviewing a PR until
55
55
you know what it's actually attempting to do.
56
56
57
- ** But Sirryan, that's not the * kind * of code review I'm interested in learning
57
+ ** But Sirryan, that's not the _ kind _ of code review I'm interested in learning
58
58
about** . Yes, yes, I know, I'm getting there. While its important to understand
59
59
the conversation (and relationship-building) parts of code review, there's also
60
60
important technical parts to review that keep our codebase moving. Before
61
61
getting into HOW to code review, we will take a look at the two types of
62
62
technical code reviews.
63
63
64
64
## Comments
65
+
65
66
Basic comments are when a reviewer leaves a message, question, or directive for
66
67
the PR author at a certain code line or chunk. For example, SteelSlayer has left
67
68
a comment on Line 12 of ` objective.dm ` inquiring about a certain variable. The
@@ -73,6 +74,7 @@ issues to be addressed quickly and efficiently.
73
74
![ image] ( ./images/reviewer_pr_conversation.png )
74
75
75
76
## Suggestions
77
+
76
78
Suggestions are when a reviewer suggests/requests a change to a certain line or
77
79
chunk of code. This leaves less agency for the PR author (especially when
78
80
suggested by a development team member or experienced reviewer) but allows for
@@ -85,6 +87,7 @@ most critical for enforcing code standards and making 1-5 line corrections.
85
87
![ image] ( ./images/reviewer_pr_suggestions.png )
86
88
87
89
## Leaving PR Reviews
90
+
88
91
The way you leave any form of comment or suggestion directly on a line or chunk
89
92
of code is under the "Files Changed" tab of the pull request. All you need to do
90
93
now is scroll down to a line of code that you want to comment on and hover over
@@ -111,6 +114,7 @@ reviews, you can submit them together in the top right of the files changes tab
111
114
once done.
112
115
113
116
## What can I start reviewing?
117
+
114
118
So you know what reviewing is, you know how to review, and you're ready to
115
119
review.... but what do you review? Knowledge of code and willingness to
116
120
understand our currently implemented systems is critically important to being
@@ -119,6 +123,7 @@ look out for on PR's to get familiarized with the code review process and get a
119
123
few reviews under your belt.
120
124
121
125
### Problematic Code Examples
126
+
122
127
Lets say a contributor has opened a pull request adding a brand-new item to the
123
128
game. This item has a few special functions and procs that you need to look
124
129
over. I will go through each part of this code that I would leave comments or
@@ -281,8 +286,8 @@ suggest to fix them as a PR reviewer.**
281
286
## The Art of Code
282
287
283
288
> ... I like it because I could make the computer do what I wanted and every
284
- > time I did that, I got this little thrill and this rush and throughout * my
285
- > entire career * . That thrill for me has never gone away [[ The Art of Code - Dylan Beattie] ( https://www.youtube.com/watch?v=6avJHaC3C2U )]
289
+ > time I did that, I got this little thrill and this rush and throughout _ my
290
+ > entire career _ . That thrill for me has never gone away [[ The Art of Code - Dylan Beattie] ( https://www.youtube.com/watch?v=6avJHaC3C2U )]
286
291
287
292
This segment might be a bit corny but I figured it would be important to include
288
293
because I felt like it was an important aspect of reviewing that I've always had
0 commit comments