Skip to main content

Improve Code Quality

Use the Improve Code Quality command to optimize your code by applying best practices and industry standards.

Overview

This command helps refactor and enhance your code to improve its performance, readability, and maintainability. It automatically applies industry best practices and coding standards while eliminating common pitfalls.

Why Use It

Improving code quality ensures long-term project success by making your code more efficient, reliable, and easier to maintain. This command helps identify and resolve potential issues—such as inefficient structures and redundant code—that could impact your project's sustainability.

Common Use Cases

  • Ensuring your code follows industry best practices and standards.
  • Simplifying a complex or inefficient codebase after multiple iterations.
  • Preparing code for deployment or a major release.
  • Enhancing code performance and maintainability.

Prerequisites

  • Install and enable WiseGPT in VS Code.
  • Open the file you want to work on.

Steps

1

Select code

Select the code you want to work on.


2

Select Command

Right-click the selected code, then select WiseGPT and choose Improve Code Quality.

tip

You can also click on the light bulb (💡) icon next to the selected code and then select Improve Code Quality.


3

Review Code

WiseGPT will present the optimized version in the Chat interface. Review the changes to ensure they meet your requirements, then apply the changes to your codebase.

Improve Code Quality

Troubleshooting

Will improving code quality affect its functionality?

No, the command focuses on enhancing readability and efficiency while maintaining existing functionality.

Can I customize the improvement standards?

You can refine the suggestions through follow-up interactions in the Chat interface.

What if I disagree with some improvements?

You have full control over which improvements to implement, and can discuss alternatives in Chat.