Here are documented the steps and protocol to follow for code reviews. Before a code review takes place, the developer
is working through a Jira ticket on the Kanban board. While they are working though this ticket they will be
making commits to their development branch. The standard format make commits is shown in Figure 7 below.
Figure 7 - Example Commit using GIT Bash shell
Notice how the commit message contained the STORE-2853. This is needed for all commits to a development branch.
Creating The Code Review
To create the Code Review, go to the ticket in JIRA and look for the "Development" section, and click on the commits.
When you do that a page will open you then need to select "Create review for all commits". The project should already
be chosen (DI2E Storefront Redesign (STORE)) now click the "Create Review" button. The final screen will be the
"Edit Review Details" where reviewers can be written in, objectives can be stated, and other info can be reviewed.
When a developer is ready to have their code reviewed they need to decide who is going to review their code. The
developer should place their Jira ticket in the Code Review section of the Kanban board and assign it to the
first reviewer. If left unassigned then the ticket should be picked up as appropriate. If unassigned and a reviewer
begins the code review, they can assign the Jira ticket to another individual if it is appropriate.
Review The Code
When a reviewer, or multiple reviewers are reviewing the code, all changed files should be reviewed and the checklist
below should be followed.
Figure 8 - Code Review Process Flow
-
Branch build is passed (Green in Jenkins).
-
No new issues in
Sonarcloud.
-
It's expected the formatting and basic style is handled by the IDE setting. Check that those were applied.
(quick scan) The NetBeans configuration can be found in the documentation on GitHub.
-
Check Coding Standards (
Front-end
and
Server)
-
Check UI against the
Style Guide
-
Check for known business rule breaks (missing cross cutting concerns; regression is expected to catch some
of this)
-
Make sure any required documentation changes are made.
From here there are a few things that can happen as seen in the following flowchart
Figure 9 - Code Review Results Workflow
The basic idea is that when a Code review is completed, based on the outcome, tickets are handled appropriately,
and individuals are notified. When the last code review is completed the reviewer is now able to close the code
review by clicking on the tools option and selecting "close".