Fixing a problem found in code review
A code review produces findings that you may or may not consider problems. If you decide that a finding is a problem that you want to address, the source code editor and Code Review Details view help you fix it.
Some findings in a code review have quick fixes. A quick fix is an automated solution for a common problem.
There could be findings that you decide to fix manually. When you select a finding, the lines in the code where the errors occur are marked, so that you can easily find and manually edit the source code to correct the problem.
To work with each finding, you decide what action, if any, you want to take to modify the code. The actions you can take are described in the following list:
- Evaluate the code review findings.
- Manually fix a problem.
- Apply a quick fix to a problem.
Code review findings
A code review finding is a line item in the Code Review view that shows code that is not compliant with the rules that were run. As a code review runs, the findings start to appear in the Code Review view. By default, all findings are grouped into the same rule categories as the rule the finding violated. However, you can configure code review to display the findings per source file.Evaluating code review findings
You need to evaluate findings in the Code Review view and decide that a finding is a problem you want to fix. It is recommended that you deal with the highest severity problems first, especially those that contain Quick Fix and Quick Fix All icons.Manually fixing a problem
If the finding does not have an automated quick fix that you can apply, you can fix the problem manually by editing the code directly in the center pane of the perspective.Applying a quick fix to a finding
Some findings in a code review have quick fixes. A quick fix is an automated solution for a common problem. You apply a quick fix to save time and ensure that a problem is fixed consistently each time. Applying a quick fix ensures that the underlying issue of a finding will be eliminated according to best practices guidelines.
Parent topic
Reviewing code automatically