Coming Soon
Comment Cleaner Pro is a powerful VS Code extension for removing comments from source code files. It helps you streamline your code by efficiently removing all types of comments (line, block, and documentation) across 25+ programming languages while preserving the core functionality of your code.
- âś… Removes all comment types (line, block, documentation, TODO/FIXME, and AI-generated) while preserving code functionality
- âś… Preserves meaningful comments for better readability
- âś… One-click cleanup with an easy-to-use command
- âś… Supports multiple programming languages
- âś… Automatic backups create safety files before removing comments
- âś… Detailed statistics track the number of comments and lines removed
- âś… Undo/Redo support to easily revert or restore changes
- âś… Configuration consistency across all entry points
- 20+ Programming Languages - Supports all major languages including Python, JavaScript (including JSX), TypeScript (including TSX), HTML, CSS, C/C++, Java, Ruby, Go, PHP, SQL, Swift, Rust, Kotlin, and more
- Intelligent Comment Detection - Accurately identifies and removes all comment types specific to each language
- Preservation of Code Structure - Maintains code indentation and formatting while removing comments
- Single File Processing - Clean comments from the current file with a single click
- Batch Processing - Process multiple files simultaneously using glob patterns
- Automatic Backups - Create safety backups before removing comments
- Customizable Rules - Configure how unknown file types and special comments are handled
- Configuration Persistence - Settings in the UI panel now properly apply to all operations
- Clear Configuration Dialogs - Intuitive options when using context menu commands
- Undo/Redo Support - Easily revert or reapply changes with dedicated undo/redo buttons
- Modern UI Controls - Circular checkboxes with green indicators for selected options
- Unlimited History - Track all cleaned files without arbitrary limits
- Individual File Management - Remove specific files from history as needed
- Responsive Design - UI elements maintain their shape and clarity at all window sizes
- Comment Count - Track the number of comments removed per file
- Line Reduction - See exactly how many lines were removed
- File Size Impact - Measure the size reduction achieved
- Accurate Tracking - Now with improved accuracy in statistics tracking
Category | Languages |
---|---|
Web Development | |
Systems Programming | |
Enterprise | |
Scripting | |
Data & Analysis | |
Mobile Development | |
Functional |
Support for other languages is coming soon. Stay tuned!
- Open VS Code
- Go to Extensions view (Ctrl+Shift+X)
- Search for "Comment Cleaner Pro"
- Click Install
Requirements:
- Visual Studio Code 1.50.0 or higher
- Python 3.6 or higher
- Open a source code file in the editor
- Right-click anywhere in the editor
- Select "Comment Cleaner Pro: Clean Current File"
- Configure your cleaning options:
- Choose whether to create a backup
- Select if TODO & FIXME comments should be preserved
- Decide whether to keep documentation comments
- Determine if unknown file types should be processed
- The editor will refresh automatically with comments removed according to your settings
- Press
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(Mac) - Type "Comment Cleaner Pro"
- Select "Comment Cleaner Pro: Clean Current File" or "Comment Cleaner Pro: Clean Multiple Files"
- Follow the prompts to configure options
- Click the Comment Cleaner Pro icon in the Activity Bar
- Choose "Clean Current File" or "Clean Multiple Files"
- View your recently cleaned files in the "Cleaned Files" section
- Use Undo/Redo buttons to revert or restore changes as needed
When cleaning multiple files:
- Enter a glob pattern to match files (e.g.,
*.js
,src/**/*.py
) - Choose whether to create backups
- Decide if unknown file types should be processed
- Monitor progress in the notification area
The extension includes a standalone Python script that can be used directly:
# Basic usage
python path/to/ccp.py "*.js"
# Process files recursively
python path/to/ccp.py "src/**/*.py" --recursive
# Preserve documentation comments
python path/to/ccp.py "*.java" --keep-doc-comments
# Preserve TODO comments
python path/to/ccp.py "*.cpp" --preserve-todo
# Don't create backups
python path/to/ccp.py "*.html" --no-backup
# Force processing of unknown file types
python path/to/ccp.py "*.custom" --force
Comment Cleaner Pro uses a sophisticated object-oriented architecture with dedicated language handlers to identify and remove comments while preserving code structure. The extension:
- Handles nested comment structures
- Preserves important comments like license headers when configured
- Detects and properly processes character escapes in strings
- Maintains code indentation and whitespace
- Provides accurate line count reduction statistics
- For very large files (10MB+), expect processing to take a few seconds
- Batch processing uses multi-threading for better performance
- Uses memory-efficient processing techniques for large files
Yes, but you can enable backups which create .bak files before processing.
Yes, you can use the dedicated Undo button in the sidebar, use standard VS Code undo operations, or restore from the .bak backup files if you enabled backups.
It supports 20+ major languages. For unlisted languages, you can try the "force" option, but results may vary.
No, the current version only processes comments based on the file extension. JavaScript or CSS comments within HTML files will not be removed. We're actively working on adding support for embedded languages in a future release.
Comment Cleaner Pro:
- Processes all files locally on your machine
- Does not send any code or data externally
- Requires no authentication or online services
- Has minimal extension permissions
This project is licensed under the GNU General Public License v3.0 - a copyleft license that ensures derivative works remain open source.
Key points:
- You are free to use, modify, and distribute this software
- If you distribute modified versions, you must:
- Make your changes open source under GPL v3
- Clearly mark what changes you've made
- Keep all copyright notices intact
- Include the original license
This ensures that Comment Cleaner Pro and all derivatives remain open source, benefiting the entire community. See the LICENSE file for full details.