Skip to main content
Version: 1.4.0

Autofix

This feature allows you to execute commands that require CodeVista to integrate Sonarlint to detect violations and get solutions for that violated task in your current coding file. To implement this feature, the Sonarlint extension needs to be installed on the IDE. Follow these steps to use the Code Context feature:

Detected Autofix Violation.

  • In the prompt input box, type the forward-slash character /, the command /autofix will be displayed as a predefined action.

Command list.png

  • Submit /autofix prompt.

No violation detected cases​

The system displays Not found any violations in this file as below:

Command list.png

Violation detected cases

The system displays detected violations as below:

Command list.png

  • Select violation line & click Propose Refactors to propose refactors.

Command list.png

Apply Refactor​​

  • After proposing refactors, click Next and Appy Refactor to confirm applying the solutions for the violation to your current file.

Command list.png

User can also review and verify the suggested refactor solution for violation before applying them to ensure they align with your intended functionality:

Command list.png