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.
- Submit /autofix prompt.
No violation detected cases
The system displays Not found any violations in this file as below:
Violation detected cases
The system displays detected violations as below:
- Select violation line & click Propose Refactors to propose refactors.
Apply Refactor
- After proposing refactors, click Next and Appy Refactor to confirm applying the solutions for the violation to your current file.
User can also review and verify the suggested refactor solution for violation before applying them to ensure they align with your intended functionality: