One of the best perks of using AI to review your code before a merge into main is that it can quickly and easily catch bugs that may have been added due to a new code change. Below we break down a use case scenario where Senior Dev will do just this.
-Adding broken code update-
In Lua, as an example I added a conditional logic statement to my if statement. You can see I saved the addition to the script with a formatting issue that would have broken the code.
*space between else AND if would have not allowed the code to compile
-Saving and committing to branch -
This was then saved, and committed to my branch.
-Submitting PR for merge to main-
After which, I submitted the changes to be merged in from my branch to main.
-Getting Senior Dev review posted as reply in Slack-
The PR immediately triggered Senior Dev to review the changes and supply a series of suggestions in Slack to improve the code. The suggestion we focus on now is that a formatting change (correct spacing) needed to be made in order for the code to function properly in Lua.
-Fixing the error-
Now for the easy part, I would simply be able to cancel the PR, go back to my code, update to the fixed suggestion, and submit a much healthier PR!
If you're looking to try out how ChatGPT 4 can automatically review your code, try out Senior Dev here.
コメント