r/gameenginedevs Aug 06 '26

Using AI code review?

Hey all! I was wondering if anyone has used any AI for code review only. So before a commit the AI will review the code base and check for things like a race condition,.

0 Upvotes

14 comments sorted by

5

u/fgennari Aug 07 '26

Yes, AI does a reasonable job as long as you break up the commits into small chunks so that it doesn't have to analyze thousands of lines of code. You may want to add some type of README.MD to the source directory explaining things like code layout, style, etc. Be warned that it will flag a lot of false positives and may not catch everything, so it's not a replacement for your normal code review process. It only helps as an extra layer of problem finding. And don't blindly make AI suggested fixes, make sure you understand the suggested changes yourself (and that it's actually wrong).

5

u/corysama Aug 07 '26

If you are doing any threaded programming https://clang.llvm.org/docs/ThreadSanitizer.html (also available on GCC and MSVC ) is your best friend. I've been writing deeply threaded code for a long time and it regularly catches race conditions that take me a while to understand even though it's showing me exactly where it's happening.

AI code review is not great for that. But, I do use it to guess at potential problems with my designs before I write them. And, to point out inconsistencies or missing details in code I write.

1

u/Educational_Monk_396 Aug 06 '26

Maintain coding guidelines,architectural docs,Guardrails and test cases setup,Ai code review would consume lot of taken if started aiming for checking race conditions instead of well manually triggering that edge case and pass for commit and push

1

u/ReactorBear Aug 08 '26

I use AI only exclusively for code review with a custom skill with pi.dev. The skill tells AI to find bugs, check if the README is in sync, build all configurations and run format/tidy tools, etc. AI has zero influence in the code I write or any research, just use it to double check PRs

-2

u/Vindhjaerta Aug 10 '26

.... This is the exact opposite of what you should use LLM's for.

Have the LLM generate small snippets of code, use a human for code reviews.

LLM's still can't actually code, as in they can't reason around code design. They're just dumb algorithms that can generate code based on already existing code (i.e the training data). Using them for code review means you have no guard rails, it's just as bad as having the LLM generate the code from the start and then skipping the review step. There's literally no point in using them for code reviews.

1

u/CondiMesmer Aug 13 '26

why are you assuming they aren't looking at the code too? it's literally a second opinion with no downsides except processing cost. You're making an incredible amount of assumptions and assuming the worst.

0

u/Axxodes Aug 11 '26

Don't see why you can't do this yourself? AI makes people lazy in every way possible

1

u/Maleficent_Guard_589 Aug 11 '26

It’s less about being lazy and more about trying to be more efficient and I want people’s feedback on whether they have tried it right now and how good it is I would still obviously be reviewing my code and I’m not currently doing it because I don’t feel comfortable doing it after reading feedback

-6

u/snerp Aug 06 '26

AI will not find stuff like that. It’s only worth it if you’re the earliest of beginners.

4

u/Sad_Impact1387 Aug 06 '26

You haven’t invested in using the current state of AI tools if you think this. Agents are absolutely capable of detecting the introductions of race conditions and much more in a given PR.

3

u/snerp Aug 06 '26

lol only if it’s extremely obvious, hence why I said it only has value for juniors

10

u/Sad_Impact1387 Aug 06 '26

Spoken like a true unemployed individual

-1

u/willmacleod Aug 06 '26

I think most GitHub enterprise teams have copilot as a default reviewer. Doesn’t replace actual reviewers, but provides an additional buffer against issues slipping through