Fix mistakes most humans miss

Get Python and Django suggestions right inside your Pull Request or check your entire codebase for tech debt and bugs.

More than a linter

Code Review Doctor gives clear and actionable advice, which you can commit to your branch directly from your pull request. Code Review Doctor understands the technologies you develop in, including Python, Django, HTML and CSS (closed beta).
344
+
from dataclasses import dataclass
345
+
	
346
+
@dataclass

Use frozen=True to make the dataclasses immutable and hashable.

Read more
Suggested changes
-
@dataclass
+
@dataclass(frozen=True)
Expand 2 lines ...
Commit suggestion
347
+
class FooBarClass:
348
+
    pass
Enforce Python best practice. Skip the docs and stay confident you're following best practice. With Code Review Doctor you stay focused right in your pull request. Read more about our Python capabilities.
344
+
class TestFeature(unittest.TestCase):
345
+
    def test_feature(self):
346
+
        self.assertTrue(value is not None)

assertIsNone and assertIsNotNone provide more helpful failure messages than assertTrue or assertFalse.

Read more
Suggested changes
-
        self.assertTrue(value is not None)
+
        self.assertIsNotNone(value)
Commit suggestion
344
+
class Migration(migrations.Migration):
345
+
    dependencies = [("core", "0001_initial.py")]
346
+
    operations = [RunPython(forwards)]

It's good to, as a minimum, specify noop in RunPython so the migration can be skipped when going backwards, and even better to specify a function that undoes the migration.

Read more
Suggested changes
-
    operations = [RunPython(forwards)]
+
    operations = [RunPython(forwards, RunPython.noop)]
Commit suggestion
Reclaim time reviewing Django code. Code Review Doctor works great for quickly detecting mistakes humans might miss, and even links you to the deep archive of best practice articles to upskill devs. Read more about our Django capabilities.
Prevent bugs. Code Review Doctor knows when code looks fishy and will raise the alarm. With Code Review Doctor you can deploy to prod knowing you've got a code reviewer on your side with the consistency and concentration of a robot.
344
+
values = (
345
+
    'yes',
346
+
    'correct'

Missing commas in tuples results in implicit string concatenation. Probably not what you intended to do.

Read more
Suggested changes
-
    'correct'
+
    'correct',
Expand 2 lines ...
Commit suggestion
347
+
    'agreed',
348
+
)

We've improved thousands of codebases including

  • Chrome

    Chrome

  • PyTorch

    PyTorch

  • Sentry

    Sentry

  • Tensorflow

    Tensorflow

  • Firefox

    Firefox

It caught malformed test assertions that were incorrect. The automated codebase audit tool is so handy!

Jared Lockhart, Senior Software Engineer at Mozilla

Extremely positive. Suggested useful changes, giving our senior developers time back.

Jon Atkinson, Technical Director at Giant

Uncovered some bugs in the tests - thanks a lot!

Patrick von Platen, Research Engineer at Hugging Face

How it works

Security of your code is our top priority. We handle your codebase with care:

  1. We are verified by GitHub and follow their security best practices.
  2. Your repository is cloned during the analysis process and deleted immediately after. No human ever sees your code.
  3. The analysis occurs on AWS lambda serverless functions which are sandboxed to the repository being analysed.
  4. The lambda functions run in a locked-down Logically Isolated Virtual Private Cloud that only accepts HTTPS requests from GitHub and Bitbucket.
  5. Over the years we've served thousands of happy customers ranging from the Public Sector, Startups, and everything in-between.

Works with tools you use