← All posts

Autofix: The future of code reviews is here

Making computers help us write good code.

Header image
By Sanket on 
Share on Twitter Share on LinkedIn Share on Facebook

It is 2020.

Humans have been writing code for almost half a century now, and making computers do stuff. We’ve automated most parts of the process of building software as well — continuous testing and integration, delivery, rollbacks, performance monitoring, live security monitoring, et al. Somehow, however, the act of writing code itself — and reviewing it for objective errors — is still 100% manual.

At DeepSource, we believe it doesn’t have to be like this. We believe computers should be able to find and fix bugs automatically. We’ve been working on this for quite some time, and we can barely contain our excitement now to show you what we’ve built.

Introducing, Autofix.

DeepSource has been able to find issues in your code so far — bug risks, anti-patterns, performance issues, and potential security vulnerabilities. Starting today, DeepSource will now be able to automatically fix some of these issues for you. We’re calling it, Autofix.

You can now see an “Autofix” button on some issues on a repository’s issues dashboard.

Issue box with Autofix button

In one click, you would be able to choose and confirm which files to run Autofix on — these are files in which at least one occurrence of an issue has been found. Autofix will generate fixes, and show you the changes in a diff format, so you can pick and choose which fixes you want to apply.

Autofix diff

Another click, and DeepSource will create a pull-request on your VCS provider (like GitHub or GitLab), which can then be merged.

Autofix diff

At the time of writing this, Autofix supports 14 issues in Python, and 21 in Go. In the coming few weeks, more issues will be added for Python and Go. In the next couple of months, we have a target of bringing at least 30% of all issues that DeepSource detects to Autofix.

Here’s a short video with the full workflow: Autofix Demo | DeepSource

What’s next?

Autofix takes us one step further in our journey towards building a great developer experience for automated code reviews. We believe the future of software development will include computers helping developers write code better and faster by automating everything in the process that can be automated.

Talking a page out of Jeff Bezos’s playbook, it’s day one for us. And we invite you to be a part of our journey as we attempt to fulfill our vision.

Welcome to the future.

Autofix diff

About DeepSource
DeepSource helps you automatically find and fix issues in your code during code reviews, such as bug risks, anti-patterns, performance issues, and security flaws. It takes less than 5 minutes to set up with your Bitbucket, GitHub, or GitLab account. It works for Python, Go, Ruby, and JavaScript.
Get started for free

Keep reading...