Reviewing a fix
Last updated
Last updated
Once you have filtered for the set of fixes for review, you may begin processing them. That typically begins with clicking on the Unresolved tab to see what fixes need to be reviewed. In our example, we will be looking at a set of fixes within the API Usage Issues category. There were 269 fixes identified. To show how to process a fix, we will look at Fix AUI-GoCUR-1-1.
In this example, it has detected the unrecommended use of the defer
keyowrd on a call to the built-in recover()
function. To learn more about why this is not recommmended, you can click on the link Go specification to learn more about the proper way to handled panics.
This is a simple misuse of handling panics as described in the linked Go specification. The description explains the problem which iCR will correct.
To see the diffs for this fix, click on the Show Diff button. Doing that reveals an expanded display.
There is a Diff: tab shown where the tab displays the changes suggested for the affected file. In this example, Diff: 1 is selected and displayed. This is the diff for the file using the improper us of the recover()
function.
The line that shows the problem is identified by the red highlighted statement. In this example, that is line 8. The text below that shows the corrected code with green highlights. The iCR generated code corrects the issue by inserting the recover()
call within a deferred fucntion shown by lines 8, 9 and 10.
If you want to browse the original source file associated with this fix, you can click on the Show Source button. A scrollable window will appear below the diff window with tabs for each of the files that have a diff for this fix. You can click on any tab to browse the source for any of the affected files. In this case Source of Diff: 1.
You can scroll through the original source file independently of the diff window.
Once you are satisfied with reviewing a particular correction, you can select other Diff: tabs to review all the suggested changes for this fix.
To view other fixes, scroll through the list of fixes or select new filters.