The Remove Dart Error/Warning extension for Visual Studio Code streamlines your Dart development workflow by automatically removing statements that cause errors or warnings in your code.
Features
Automated Cleanup: Scans your Dart files and removes lines with statements that have associated errors or warnings, helping to maintain clean and error-free code.
User-Friendly Commands: Easily accessible through the command palette or context menu for quick integration into your development process.
How to Use
Using Command Palette:
Press Ctrl + Shift + P (or Cmd + Shift + P on macOS).
Type the desired command and select it when it appears:
Remove Dart Error/Warning
Remove Dart Errors Only
Remove Dart Warnings Only
Using Context Menu:
Right-click within the code editor.
Select the desired command from the context menu:
Remove Dart Error/Warning
Remove Dart Errors Only
Remove Dart Warnings Only
Note: The extension uses the following regular expressions to identify and remove lines:
For Import, Export, Part, and Part of Statements:
^(import|export|part|part of)\s
This regex matches lines that are import, export, part, or part of statements.
For Variable Declarations Starting with const, final, var, or late:
Contributions are welcome! If you encounter issues or have suggestions for improvements, please visit the GitHub repository to report them or submit pull requests.
License
This project is licensed under the MIT License. See the LICENSE file for details.