cblavier

cblavier

AI-based Pull Request reviews

We tried Sourcery, a GitHub integration that posts instant AI-based code reviews on our pull requests.

I was pleasantly surprised by how relevant the code reviews were :exploding_head:

Some excerpts:



Please let me know if you

  • have ever tried such tools?
  • have any recommendations for a specific tool?

Marked As Solved

shiroyasha

shiroyasha

Reporting back after a couple of weeks of using Sourcery that @cblavier shared. Initially the tool was a nuisance, it generated too much content and interfered with human-to-human communication. We had to silence most of its options, and to add a couple of extra handcrafted prompts to make it behave in a reasonable way.

With those additions, the generated comments started to be actually useful. It is not able to detect larger problems, wrong architecture decisions, but it is good at spotting typos, missing validations, edge cases, etc… It reduces the burden of manual reviews and gives feedback faster to the team.

Overall, the tool is in the nice-to-have category, but not yet in the must-have category.

Also Liked

dimitarvp

dimitarvp

For typo checks you should use GitHub - crate-ci/typos: Source code spell checker · GitHub. I’m using it almost every day and it simply works every time.

It even has a GitHub action if you don’t want to only use it as an offline CLI tool (which is how I use it exclusively but a GitHub action is super useful for CI/CD).

rbino

rbino

Ash Core Team

This could be another alternative:

https://github.com/brave/pull-merge

I’ve never personally tried it but the maintainer is a friend of mine and he told me it’s generic so it should work on any type of repo.

D4no0

D4no0

I think this should be highlighted, as this is the silver lining. Such tools are just linters on steroids, even though I doubt they are that consistent, it would be a mistake to assume that they can replace the human factor in code reviews.

I also think it’s also important to point out that this might be a shortcut for companies that never understood how to setup and use already existing static analysis tools like credo (especially with custom made check rules).

Last Post!

earonesty

earonesty

typo: coderev.q32.com, sorry

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36689 110
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement