Handle incorrect DCR code suggestions during interaction
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Currently, the chat experience of Duo Code Review on MergeRequest can end up creating a code suggestion that is not applicable to the current DiffNote position. Applying those incorrect suggestions, would make a mess as the code suggestion is not meant to be applied on that line.
Example: #501150 (comment 2336430176)
Possible solutions
- Don't turn code blocks into a code suggestion if the first line of
<from>tag is the same as the current line DiffNote is left on.<from>tag should contain the lines that needs to change so we could return a simple code block instead.Weight: 2 - We could consider allowing Duo to leave those code suggestion on the line where it can be applied. I think that could be possible and perhaps more user friendly, but it would require more effort.
Weight: 3 or more
Edited by 🤖 GitLab Bot 🤖