Skip to main content

Autofix

Get code fixes suggestions automatically.

Gabriele Gallo Stampino avatar
Written by Gabriele Gallo Stampino
Updated over 2 weeks ago


Overview

Clayton Autofix is an automated tool designed to identify and resolve issues in code with minimal manual intervention. It integrates seamlessly with Clayton’s code analysis platform and can automatically suggest and apply fixes based on pre-configured rules.

Functionality

Autofix works by scanning the codebase to detect issues using Clayton’s policies and rules. When a fixable issue is identified, it provides suggested corrections that developers can review. If enabled, Autofix can automatically create a pull request containing all the proposed fixes, allowing for a structured review process before merging the changes into the codebase.

Currently, Autofix creates a PR to address all identified issues at once, and users cannot selectively pick individual issues for fixes.

Features

Autofix enables automatic code fixing, reducing the need for manual intervention. It supports direct integration with Git repositories, including GitHub, Bitbucket, and GitLab, streamlining the development workflow. The tool utilizes Clayton’s proprietary Clay programming language , Autofix covers Apex, Lightning Web Components (LWC), Visualforce, and metadata analysis, ensuring compliance with best practices and security standards.


Get fix suggestions in clicks

Get fix suggestions in clicks

You can get fix suggestions to resolve specific types of issues present in any branch:

  1. Go to your project

  2. Click on Branches or pull requests > select your desired branch or pull request from the dropdown

  3. Select an available scan report​

  4. Navigate the code review and click on Fix


Currently supported rules

Autofix currently supports the following out-of-the-box rules:

Did this answer your question?